flow-api-translator 0.21.0 → 0.21.1
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/dist/flowDefToTSDef.js
CHANGED
|
@@ -2355,8 +2355,8 @@ const getTransforms = (originalCode, scopeManager, opts) => {
|
|
|
2355
2355
|
|
|
2356
2356
|
const params = typeParameters.params;
|
|
2357
2357
|
|
|
2358
|
-
if (params.length >
|
|
2359
|
-
throw translationError(node, `Expected at no more than
|
|
2358
|
+
if (params.length > 3) {
|
|
2359
|
+
throw translationError(node, `Expected at no more than 3 type parameters with \`${fullTypeName}\``);
|
|
2360
2360
|
}
|
|
2361
2361
|
|
|
2362
2362
|
const newParams = (() => {
|
|
@@ -2364,7 +2364,8 @@ const getTransforms = (originalCode, scopeManager, opts) => {
|
|
|
2364
2364
|
return assertHasExactlyNTypeParameters(1);
|
|
2365
2365
|
}
|
|
2366
2366
|
|
|
2367
|
-
const
|
|
2367
|
+
const props = transformTypeAnnotationType(params[0]);
|
|
2368
|
+
const ref = transformTypeAnnotationType(params[1]);
|
|
2368
2369
|
return [{
|
|
2369
2370
|
type: 'TSIntersectionType',
|
|
2370
2371
|
loc: DUMMY_LOC,
|
|
@@ -2530,10 +2530,10 @@ const getTransforms = (
|
|
|
2530
2530
|
);
|
|
2531
2531
|
}
|
|
2532
2532
|
const params = typeParameters.params;
|
|
2533
|
-
if (params.length >
|
|
2533
|
+
if (params.length > 3) {
|
|
2534
2534
|
throw translationError(
|
|
2535
2535
|
node,
|
|
2536
|
-
`Expected at no more than
|
|
2536
|
+
`Expected at no more than 3 type parameters with \`${fullTypeName}\``,
|
|
2537
2537
|
);
|
|
2538
2538
|
}
|
|
2539
2539
|
|
|
@@ -2542,7 +2542,8 @@ const getTransforms = (
|
|
|
2542
2542
|
return assertHasExactlyNTypeParameters(1);
|
|
2543
2543
|
}
|
|
2544
2544
|
|
|
2545
|
-
const
|
|
2545
|
+
const props = transformTypeAnnotationType(params[0]);
|
|
2546
|
+
const ref = transformTypeAnnotationType(params[1]);
|
|
2546
2547
|
|
|
2547
2548
|
return [
|
|
2548
2549
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flow-api-translator",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "Toolkit for creating Flow and TypeScript compatible libraries from Flow source code.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"@typescript-eslint/parser": "7.2.0",
|
|
14
14
|
"@typescript-eslint/visitor-keys": "7.2.0",
|
|
15
15
|
"flow-enums-runtime": "^0.0.6",
|
|
16
|
-
"hermes-eslint": "0.21.
|
|
17
|
-
"hermes-estree": "0.21.
|
|
18
|
-
"hermes-parser": "0.21.
|
|
19
|
-
"hermes-transform": "0.21.
|
|
16
|
+
"hermes-eslint": "0.21.1",
|
|
17
|
+
"hermes-estree": "0.21.1",
|
|
18
|
+
"hermes-parser": "0.21.1",
|
|
19
|
+
"hermes-transform": "0.21.1",
|
|
20
20
|
"typescript": "5.3.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|