ast-types 0.12.3 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/def/typescript.js CHANGED
@@ -89,7 +89,7 @@ function default_1(fork) {
89
89
  def("TSLiteralType")
90
90
  .bases("TSType")
91
91
  .build("literal")
92
- .field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral")));
92
+ .field("literal", or(def("NumericLiteral"), def("StringLiteral"), def("BooleanLiteral"), def("TemplateLiteral"), def("UnaryExpression")));
93
93
  ["TSUnionType",
94
94
  "TSIntersectionType",
95
95
  ].forEach(function (typeName) {
package/gen/builders.d.ts CHANGED
@@ -1904,10 +1904,10 @@ export interface TSArrayTypeBuilder {
1904
1904
  }): N.TSArrayType;
1905
1905
  }
1906
1906
  export interface TSLiteralTypeBuilder {
1907
- (literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind): N.TSLiteralType;
1907
+ (literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind): N.TSLiteralType;
1908
1908
  from(params: {
1909
1909
  comments?: K.CommentKind[] | null;
1910
- literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind;
1910
+ literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind;
1911
1911
  loc?: K.SourceLocationKind | null;
1912
1912
  }): N.TSLiteralType;
1913
1913
  }
package/gen/nodes.d.ts CHANGED
@@ -1042,7 +1042,7 @@ export interface TSArrayType extends Omit<TSType, "type"> {
1042
1042
  }
1043
1043
  export interface TSLiteralType extends Omit<TSType, "type"> {
1044
1044
  type: "TSLiteralType";
1045
- literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind;
1045
+ literal: K.NumericLiteralKind | K.StringLiteralKind | K.BooleanLiteralKind | K.TemplateLiteralKind | K.UnaryExpressionKind;
1046
1046
  }
1047
1047
  export interface TSUnionType extends Omit<TSType, "type"> {
1048
1048
  type: "TSUnionType";
package/lib/scope.js CHANGED
@@ -145,7 +145,10 @@ function scopePlugin(fork) {
145
145
  });
146
146
  recursiveScanChild(path.get("body"), bindings, scopeTypes);
147
147
  }
148
- else if (namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) {
148
+ else if ((namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) ||
149
+ (namedTypes.InterfaceDeclaration && namedTypes.InterfaceDeclaration.check(node)) ||
150
+ (namedTypes.TSTypeAliasDeclaration && namedTypes.TSTypeAliasDeclaration.check(node)) ||
151
+ (namedTypes.TSInterfaceDeclaration && namedTypes.TSInterfaceDeclaration.check(node))) {
149
152
  addTypePattern(path.get("id"), scopeTypes);
150
153
  }
151
154
  else if (namedTypes.VariableDeclarator.check(node)) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Ben Newman <bn@cs.stanford.edu>",
3
3
  "name": "ast-types",
4
- "version": "0.12.3",
4
+ "version": "0.12.4",
5
5
  "description": "Esprima-compatible implementation of the Mozilla JS Parser API",
6
6
  "keywords": [
7
7
  "ast",
@@ -38,24 +38,24 @@
38
38
  },
39
39
  "dependencies": {},
40
40
  "devDependencies": {
41
- "@babel/parser": "^7.4.2",
42
- "@babel/types": "^7.4.0",
43
- "@types/esprima": "^4.0.2",
44
- "@types/glob": "^7.1.1",
45
- "@types/mocha": "^5.2.5",
46
- "@types/node": "^10.12.9",
47
- "espree": "^4.0.0",
48
- "esprima": "~4.0.0",
49
- "esprima-fb": "~14001.1.0-dev-harmony-fb",
50
- "flow-parser": "^0.83.0",
51
- "glob": "^7.1.2",
52
- "mocha": "^5.0.0",
53
- "recast": "^0.17.3",
54
- "reify": "^0.18.1",
55
- "ts-add-module-exports": "^1.0.0",
56
- "ts-emit-clean": "^1.0.0",
57
- "ts-node": "^7.0.1",
58
- "typescript": "^3.3.4000"
41
+ "@babel/parser": "7.4.3",
42
+ "@babel/types": "7.4.0",
43
+ "@types/esprima": "4.0.2",
44
+ "@types/glob": "7.1.1",
45
+ "@types/mocha": "5.2.6",
46
+ "@types/node": "11.13.7",
47
+ "espree": "5.0.1",
48
+ "esprima": "4.0.1",
49
+ "esprima-fb": "15001.1001.0-dev-harmony-fb",
50
+ "flow-parser": "0.97.0",
51
+ "glob": "7.1.3",
52
+ "mocha": "6.1.4",
53
+ "recast": "0.17.5",
54
+ "reify": "0.18.1",
55
+ "ts-add-module-exports": "1.0.0",
56
+ "ts-emit-clean": "1.0.0",
57
+ "ts-node": "7.0.1",
58
+ "typescript": "3.4.3"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=4"