Socket
Socket
Sign inDemoInstall

ast-types

Package Overview
Dependencies
0
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.6 to 0.11.7

def/type-annotations.js

3

def/es6.js

@@ -91,2 +91,5 @@ module.exports = function (fork) {

def("ObjectProperty")
.field("shorthand", Boolean, defaults["false"]);
def("PropertyPattern")

@@ -93,0 +96,0 @@ .bases("Pattern")

38

def/flow.js
module.exports = function (fork) {
fork.use(require("./es7"));
fork.use(require("./type-annotations"));

@@ -209,8 +210,2 @@ var types = fork.use(require("../lib/types"));

def("Identifier")
.field("typeAnnotation", or(def("TypeAnnotation"), null), defaults["null"]);
def("ObjectPattern")
.field("typeAnnotation", or(def("TypeAnnotation"), null), defaults["null"]);
def("TypeParameterDeclaration")

@@ -235,29 +230,5 @@ .bases("Node")

def("Function")
.field("returnType",
or(def("TypeAnnotation"), null),
defaults["null"])
.field("typeParameters",
or(def("TypeParameterDeclaration"), null),
defaults["null"]);
def("ClassProperty")
.build("key", "value", "typeAnnotation", "static")
.field("value", or(def("Expression"), null))
.field("typeAnnotation", or(def("TypeAnnotation"), null))
.field("static", Boolean, defaults["false"])
.field("variance", LegacyVariance, defaults["null"]);
["ClassDeclaration",
"ClassExpression",
].forEach(typeName => {
def(typeName)
.field("typeParameters",
or(def("TypeParameterDeclaration"), null),
defaults["null"])
.field("superTypeParameters",
or([def("GenericTypeAnnotation")], null),
defaults["null"]);
});
def("ClassImplements")

@@ -272,9 +243,2 @@ .bases("Node")

["ClassDeclaration",
"ClassExpression",
].forEach(typeName => {
def(typeName)
.field("implements", [def("ClassImplements")], defaults.emptyArray);
});
def("InterfaceDeclaration")

@@ -281,0 +245,0 @@ .bases("Declaration")

@@ -5,2 +5,3 @@ module.exports = function (fork) {

fork.use(require("./babel-core"));
fork.use(require("./type-annotations"));

@@ -206,5 +207,5 @@ var types = fork.use(require("../lib/types"));

.build("typeParameter", "typeAnnotation")
.field("readonly", Boolean, defaults["false"])
.field("readonly", or(Boolean, "+", "-"), defaults["false"])
.field("typeParameter", def("TSTypeParameter"))
.field("optional", Boolean, defaults["false"])
.field("optional", or(Boolean, "+", "-"), defaults["false"])
.field("typeAnnotation",

@@ -305,3 +306,3 @@ or(def("TSType"), null),

.build("exprName")
.field("exprName", def("Identifier"));
.field("exprName", IdOrQualifiedName);

@@ -324,2 +325,3 @@ // Inferred from Babylon's tsParseTypeMember method.

.bases("Identifier")
.build("name", "constraint", "default")
.field("name", String)

@@ -430,11 +432,2 @@ .field("constraint", or(def("TSType"), null), defaults["null"])

["ClassDeclaration",
"ClassExpression",
].forEach(typeName => {
def(typeName)
.field("implements",
[def("TSExpressionWithTypeArguments")],
defaults.emptyArray);
});
def("TSParameterProperty")

@@ -441,0 +434,0 @@ .bases("Pattern")

{
"author": "Ben Newman <bn@cs.stanford.edu>",
"name": "ast-types",
"version": "0.11.6",
"version": "0.11.7",
"description": "Esprima-compatible implementation of the Mozilla JS Parser API",

@@ -6,0 +6,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc