babel-plugin-typescript-to-flow
Advanced tools
Comparing version 0.15.9-alpha.1 to 0.15.9
@@ -72,3 +72,2 @@ "use strict"; | ||
: t.anyTypeAnnotation()); | ||
// @ts-expect-error todo: @babel/types | ||
prop.static = member.static; | ||
@@ -75,0 +74,0 @@ prop.optional = !!member.optional; |
import * as t from '@babel/types'; | ||
export declare function convertFunctionTypeAnnotation(node: t.TSFunctionType | t.TSMethodSignature | t.TSCallSignatureDeclaration | t.TSDeclareFunction | t.TSDeclareMethod): { | ||
typeParams: { | ||
leadingComments?: readonly t.Comment[] | null | undefined; | ||
innerComments?: readonly t.Comment[] | null | undefined; | ||
trailingComments?: readonly t.Comment[] | null | undefined; | ||
leadingComments?: t.Comment[] | null | undefined; | ||
innerComments?: t.Comment[] | null | undefined; | ||
trailingComments?: t.Comment[] | null | undefined; | ||
start?: number | null | undefined; | ||
@@ -8,0 +8,0 @@ end?: number | null | undefined; |
@@ -38,2 +38,3 @@ "use strict"; | ||
const { typeParams, parameters, rest, returnType } = (0, convertFunctionTypeAnnotation_1.convertFunctionTypeAnnotation)(srcDeclaration); | ||
// @ts-expect-error bug in @babel/types | ||
const id = t.identifier(((_a = srcDeclaration === null || srcDeclaration === void 0 ? void 0 : srcDeclaration.id) === null || _a === void 0 ? void 0 : _a.name) || 'fn'); | ||
@@ -40,0 +41,0 @@ id.typeAnnotation = t.typeAnnotation(t.functionTypeAnnotation(typeParams, parameters, rest, returnType ? returnType : t.anyTypeAnnotation())); |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.15.9-alpha.1", | ||
"version": "0.15.9", | ||
"scripts": { | ||
@@ -30,19 +30,19 @@ "cover": "jest --coverage", | ||
"dependencies": { | ||
"@babel/template": "^7.16.7", | ||
"@babel/traverse": "^7.18.2", | ||
"@babel/types": "^7.18.2" | ||
"@babel/template": "^7.18.6", | ||
"@babel/traverse": "^7.18.8", | ||
"@babel/types": "^7.18.8" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-class-properties": "^7.17.12", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.18.0", | ||
"@babel/preset-env": "^7.18.2", | ||
"@babel/preset-typescript": "^7.17.12", | ||
"@flowts/babel-plugin-recast": "^0.15.9-alpha.1", | ||
"@babel/plugin-proposal-class-properties": "^7.18.6", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.18.6", | ||
"@babel/preset-env": "^7.18.6", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@flowts/babel-plugin-recast": "^0.15.9", | ||
"@types/babel__traverse": "7.17.1", | ||
"@types/jest": "^27.5.1", | ||
"@types/jest": "^28.1.6", | ||
"@zxbodya/recast": "0.21.3", | ||
"jest": "^28.1.0", | ||
"prettier": "^2.5.1", | ||
"jest": "^28.1.3", | ||
"prettier": "^2.7.1", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.7.2" | ||
"typescript": "^4.7.4" | ||
}, | ||
@@ -55,3 +55,3 @@ "jest": { | ||
}, | ||
"gitHead": "09662e9004ec008668a1e304b92bb1ac5341e6cd" | ||
"gitHead": "12074b356b3facb1b80a09dd44bb84667d76520c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147555
Updated@babel/template@^7.18.6
Updated@babel/traverse@^7.18.8
Updated@babel/types@^7.18.8