@@ -511,7 +511,7 @@ fn is_simple_type(ts_type: &TSType) -> bool {
511511 if node. type_arguments . is_some ( ) {
512512 return false ;
513513 }
514- if let TSTypeName :: IdentifierReference ( _ ) = & node. type_name {
514+ if node . type_name . is_identifier ( ) || node. type_name . is_qualified_name ( ) {
515515 return true ;
516516 }
517517 return false ;
@@ -970,9 +970,17 @@ export const test = testFn<{name: string}>({name: 'test'});",
970970const instance = new MyClass<number>(42);" ,
971971 Some ( serde_json:: json!( [ { "default" : "generic" } ] ) ) ,
972972 ) ,
973+ // https://github.com/oxc-project/oxc/issues/12605
974+ ( "let a: factories.User[] = [];" , Some ( serde_json:: json!( [ { "default" : "array-simple" } ] ) ) ) ,
975+ ( "let a: factories.TT.User[] = [];" , Some ( serde_json:: json!( [ { "default" : "array-simple" } ] ) ) ) ,
976+ (
977+ "let z: readonly factories.User[] = [];" ,
978+ Some ( serde_json:: json!( [ { "readonly" : "array-simple" } ] ) ) ,
979+ ) ,
973980 ] ;
974981
975982 let fail = vec ! [
983+ ( "let a: factories.User[] = [];" , Some ( serde_json:: json!( [ { "default" : "generic" } ] ) ) ) ,
976984 ( "let a: Array<number> = [];" , Some ( serde_json:: json!( [ { "default" : "array" } ] ) ) ) ,
977985 ( "let a: Array<string | number> = [];" , Some ( serde_json:: json!( [ { "default" : "array" } ] ) ) ) ,
978986 ( "let a: ReadonlyArray<number> = [];" , Some ( serde_json:: json!( [ { "default" : "array" } ] ) ) ) ,
0 commit comments