Skip to content

Commit fb4e3d8

Browse files
author
Arthur Ozga
committed
essymbol and object
1 parent e2b3c9c commit fb4e3d8

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

src/compiler/checker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,10 +2295,10 @@ namespace ts {
22952295
return createKeywordTypeNode(SyntaxKind.NeverKeyword);
22962296
}
22972297
if (type.flags & TypeFlags.ESSymbol) {
2298-
throw new Error("ESSymbol not implemented");
2298+
return createKeywordTypeNode(SyntaxKind.SymbolKeyword);
22992299
}
23002300
if (type.flags & TypeFlags.NonPrimitive) {
2301-
throw new Error("Non primitive not implemented");
2301+
return createKeywordTypeNode(SyntaxKind.ObjectKeyword);
23022302
}
23032303
if (type.flags & TypeFlags.TypeParameter && (type as TypeParameter).isThisType) {
23042304
if (context.inObjectTypeLiteral) {

tests/cases/fourslash/codeFixClassImplementInterfacePropertyEnum.ts renamed to tests/cases/fourslash/codeFixClassImplementInterfaceProperty.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44

55
//// enum E { a,b,c }
66
//// interface I {
7-
//// a: E;
7+
//// x: E;
8+
//// y: E.a
9+
//// z: symbol;
10+
//// w: object;
811
//// }
912
//// class C implements I {[| |]}
1013

1114
verify.rangeAfterCodeFix(`
12-
a: E;
15+
x: E;
16+
y: E.a;
17+
z: symbol;
18+
w: object;
1319
`);

tests/cases/fourslash/codeFixClassImplementInterfacePropertyEnumLiteral.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)