From 942822f52e0d1a30a87d33e53a88dc1de45d2f1c Mon Sep 17 00:00:00 2001 From: Jason Gwartz Date: Mon, 1 Apr 2024 17:59:37 -0400 Subject: [PATCH] Update isCompatibleType doc comment to remove specific reference to string literal types --- codegen/src/internal/ClassGen.pkl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/codegen/src/internal/ClassGen.pkl b/codegen/src/internal/ClassGen.pkl index 99c38cf..6268abd 100644 --- a/codegen/src/internal/ClassGen.pkl +++ b/codegen/src/internal/ClassGen.pkl @@ -69,10 +69,9 @@ local function isSameType(typeA: reflect.Type, typeB: reflect.Type) = // but we will pretend it is always false for now. else false -// TypeScript allows extending interfaces to override properties from the parent interface as long -// as the new type is compatible with the parent property's type. One useful example of this, and -// the only current supported way below, is when the parent type is String-type, and the child type is a string-literal type. -// In the future we could add more detailed compatibility checks. +// TypeScript allows extending interfaces to override properties from the parent interface, as long +// as the new type is compatible with the parent property's type. This check is not exhaustive and +// will likely be updated over time. local function isCompatibleType(parentType: reflect.Type, childType: reflect.Type) = ( parentType is reflect.DeclaredType &&