1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

Add typeof type tests

This commit is contained in:
joshvera 2017-03-27 17:02:51 -04:00
parent 40423e47d5
commit 0d123d1936
10 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,2 @@
let foo: Z;
let bar: typeof Foo;

View File

@ -0,0 +1,2 @@
let foo: typeof Bar;
let bar: G;

View File

@ -0,0 +1,13 @@
{+(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier))))))+}

View File

@ -0,0 +1,13 @@
{+(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier))))))+}

View File

@ -0,0 +1,13 @@
{-(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier))))))-}

View File

@ -0,0 +1,13 @@
{-(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier))))))-}

View File

@ -0,0 +1,15 @@
(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
{ (Identifier)
->(Identifier) }))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
{ (Identifier)
->(Identifier) })))))

View File

@ -0,0 +1,15 @@
(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
{ (Identifier)
->(Identifier) }))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
{ (Identifier)
->(Identifier) })))))

View File

@ -0,0 +1,13 @@
(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier))))))

View File

@ -0,0 +1,13 @@
(Program
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_query"
(Identifier)))))
(Other "lexical_declaration"
(Other "variable_declarator"
(Identifier)
(Ty
(Other "type_reference"
(Identifier))))))