@@ -1064,6 +1064,41 @@ export interface A{
10641064 } ,
10651065 } ) ;
10661066 } ) ;
1067+
1068+ it ( 'should get the range of an unknown type as undefined' , async ( ) => {
1069+ expect ( await getFieldRange ( 'fieldA: unknown' , { } ) )
1070+ . toEqual ( { type : 'undefined' } ) ;
1071+ } ) ;
1072+
1073+ it ( 'should get the range of an undefined type as undefined' , async ( ) => {
1074+ expect ( await getFieldRange ( 'fieldA: undefined' , { } ) )
1075+ . toEqual ( { type : 'undefined' } ) ;
1076+ } ) ;
1077+
1078+ it ( 'should get the range of an any type as undefined' , async ( ) => {
1079+ expect ( await getFieldRange ( 'fieldA: any' , { } ) )
1080+ . toEqual ( { type : 'undefined' } ) ;
1081+ } ) ;
1082+
1083+ it ( 'should get the range of an void type as undefined' , async ( ) => {
1084+ expect ( await getFieldRange ( 'fieldA: void' , { } ) )
1085+ . toEqual ( { type : 'undefined' } ) ;
1086+ } ) ;
1087+
1088+ it ( 'should get the range of a null type as undefined' , async ( ) => {
1089+ expect ( await getFieldRange ( 'fieldA: null' , { } ) )
1090+ . toEqual ( { type : 'undefined' } ) ;
1091+ } ) ;
1092+
1093+ it ( 'should get the range of a union type as undefined' , async ( ) => {
1094+ expect ( await getFieldRange ( 'fieldA: number | string' , { } ) )
1095+ . toEqual ( { type : 'undefined' } ) ;
1096+ } ) ;
1097+
1098+ it ( 'should get the range of a tuple type as undefined' , async ( ) => {
1099+ expect ( await getFieldRange ( 'fieldA: [ number, string ]' , { } ) )
1100+ . toEqual ( { type : 'undefined' } ) ;
1101+ } ) ;
10671102 } ) ;
10681103
10691104 describe ( 'getFieldDefault' , ( ) => {
0 commit comments