Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

fix: Fix issues with parsing types and directives #65

Merged
merged 25 commits into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0a800e3
fix: add proper support for unsupported types
armano2 Dec 21, 2018
5e3498b
fix: add missing TSAbstractClassDeclaration in ast-node-types
armano2 Dec 21, 2018
052c073
test: correct test for TSParenthesizedType
armano2 Dec 21, 2018
51e15b5
fix: add missing TSBigIntKeyword to ast-node-types
armano2 Dec 21, 2018
d3704b1
test: add test cases for true/false typed keywords
armano2 Dec 22, 2018
410386d
test: add keyword: never, null, object, symbol, undefined, unknown, void
armano2 Dec 22, 2018
672f0f8
chore: add links to issues
armano2 Dec 22, 2018
010f0cb
fix: add missing BigIntKeyword to isTypeKeyword
armano2 Dec 23, 2018
aa048d8
fix: correct detection of destructing assigment
armano2 Dec 23, 2018
4061041
test: enable tests
armano2 Dec 23, 2018
9e3a7b4
test: change babel sourceType to unambiguous
armano2 Dec 23, 2018
1624c13
chore: update message
armano2 Dec 24, 2018
2859fa2
chore: update comments
armano2 Dec 25, 2018
64465e3
fix: add directive field to ExpressionStatement
armano2 Dec 25, 2018
d2aada2
fix: add TSTypeQuery and TSIndexedAccessType to supported types
armano2 Dec 25, 2018
35e483c
fix: add TSConditionalType to known types
armano2 Dec 25, 2018
aa59b4f
fix: add TSRestType to known types
armano2 Dec 25, 2018
90319aa
test: fix rebase conflict
armano2 Dec 25, 2018
5a568c5
fix: treeNodeMaps for types and add typeMode
armano2 Dec 26, 2018
6ba943e
chore: remove unnecessary block scope
armano2 Dec 26, 2018
00088ea
test: add missing tests for literal variables
armano2 Dec 26, 2018
6e96dc8
test: enable keyof-operator alignment test
armano2 Dec 26, 2018
5b6632d
fix: mark nodes as directives in module and namespaces
armano2 Dec 27, 2018
9ebb049
Merge branch 'master' into aligment
armano2 Dec 27, 2018
d55c3c9
fix: add support for mapped types
armano2 Dec 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "BSD-2-Clause",
"devDependencies": {
"@babel/code-frame": "7.0.0",
"@babel/parser": "7.1.6",
"@babel/parser": "7.2.3",
"@commitlint/cli": "^7.1.2",
"@commitlint/config-conventional": "^7.1.2",
"@commitlint/travis-cli": "^7.1.2",
Expand Down
27 changes: 19 additions & 8 deletions src/ast-node-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,26 @@ export const AST_NODE_TYPES: { [key: string]: string } = {
ThisExpression: 'ThisExpression',
ThrowStatement: 'ThrowStatement',
TryStatement: 'TryStatement',
UnaryExpression: 'UnaryExpression',
UpdateExpression: 'UpdateExpression',
VariableDeclaration: 'VariableDeclaration',
VariableDeclarator: 'VariableDeclarator',
WhileStatement: 'WhileStatement',
WithStatement: 'WithStatement',
YieldExpression: 'YieldExpression',
/**
* TS-prefixed nodes
*/
TSAbstractClassDeclaration: 'TSAbstractClassDeclaration',
TSAbstractClassProperty: 'TSAbstractClassProperty',
TSAbstractKeyword: 'TSAbstractKeyword',
TSAbstractMethodDefinition: 'TSAbstractMethodDefinition',
TSAnyKeyword: 'TSAnyKeyword',
TSArrayType: 'TSArrayType',
TSAsyncKeyword: 'TSAsyncKeyword',
TSBooleanKeyword: 'TSBooleanKeyword',
TSBigIntKeyword: 'TSBigIntKeyword',
TSConditionalType: 'TSConditionalType',
TSConstructorType: 'TSConstructorType',
TSConstructSignature: 'TSConstructSignature',
TSDeclareKeyword: 'TSDeclareKeyword',
Expand All @@ -106,6 +116,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = {
TSExportKeyword: 'TSExportKeyword',
TSImportType: 'TSImportType',
TSLiteralType: 'TSLiteralType',
TSIndexedAccessType: 'TSIndexedAccessType',
TSIndexSignature: 'TSIndexSignature',
TSInterfaceBody: 'TSInterfaceBody',
TSInterfaceDeclaration: 'TSInterfaceDeclaration',
Expand All @@ -119,6 +130,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = {
TSNeverKeyword: 'TSNeverKeyword',
TSNullKeyword: 'TSNullKeyword',
TSNumberKeyword: 'TSNumberKeyword',
TSMappedType: 'TSMappedType',
TSObjectKeyword: 'TSObjectKeyword',
TSParameterProperty: 'TSParameterProperty',
TSPrivateKeyword: 'TSPrivateKeyword',
Expand All @@ -128,6 +140,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = {
TSQualifiedName: 'TSQualifiedName',
TSQuestionToken: 'TSQuestionToken',
TSReadonlyKeyword: 'TSReadonlyKeyword',
TSRestType: 'TSRestType',
TSStaticKeyword: 'TSStaticKeyword',
TSStringKeyword: 'TSStringKeyword',
TSSymbolKeyword: 'TSSymbolKeyword',
Expand All @@ -140,15 +153,13 @@ export const AST_NODE_TYPES: { [key: string]: string } = {
TSTypeParameterInstantiation: 'TSTypeParameterInstantiation',
TSTypePredicate: 'TSTypePredicate',
TSTypeReference: 'TSTypeReference',
TSTypeQuery: 'TSTypeQuery',
TSIntersectionType: 'TSIntersectionType',
TSTupleType: 'TSTupleType',
TSOptionalType: 'TSOptionalType',
TSParenthesizedType: 'TSParenthesizedType',
TSUnionType: 'TSUnionType',
TSUndefinedKeyword: 'TSUndefinedKeyword',
TSUnknownKeyword: 'TSUnknownKeyword',
TSVoidKeyword: 'TSVoidKeyword',
UnaryExpression: 'UnaryExpression',
UpdateExpression: 'UpdateExpression',
VariableDeclaration: 'VariableDeclaration',
VariableDeclarator: 'VariableDeclarator',
WhileStatement: 'WhileStatement',
WithStatement: 'WithStatement',
YieldExpression: 'YieldExpression'
TSVoidKeyword: 'TSVoidKeyword'
};
Loading