mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
essymbol and object
This commit is contained in:
parent
e2b3c9c663
commit
fb4e3d87bd
@ -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) {
|
||||
|
||||
@ -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;
|
||||
`);
|
||||
@ -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;
|
||||
`);
|
||||
Loading…
x
Reference in New Issue
Block a user