essymbol and object

This commit is contained in:
Arthur Ozga 2017-03-26 22:45:13 -07:00
parent e2b3c9c663
commit fb4e3d87bd
3 changed files with 10 additions and 17 deletions

View File

@ -2295,10 +2295,10 @@ namespace ts {
return createKeywordTypeNode(SyntaxKind.NeverKeyword);
}
if (type.flags & TypeFlags.ESSymbol) {
throw new Error("ESSymbol not implemented");
return createKeywordTypeNode(SyntaxKind.SymbolKeyword);
}
if (type.flags & TypeFlags.NonPrimitive) {
throw new Error("Non primitive not implemented");
return createKeywordTypeNode(SyntaxKind.ObjectKeyword);
}
if (type.flags & TypeFlags.TypeParameter && (type as TypeParameter).isThisType) {
if (context.inObjectTypeLiteral) {

View File

@ -4,10 +4,16 @@
//// enum E { a,b,c }
//// interface I {
//// a: E;
//// x: E;
//// y: E.a
//// z: symbol;
//// w: object;
//// }
//// class C implements I {[| |]}
verify.rangeAfterCodeFix(`
a: E;
x: E;
y: E.a;
z: symbol;
w: object;
`);

View File

@ -1,13 +0,0 @@
/// <reference path='fourslash.ts' />
// @lib: es2017
//// enum E { a,b,c }
//// interface I {
//// a: E.a
//// }
//// class C implements I {[| |]}
verify.rangeAfterCodeFix(`
a: E.a;
`);