flow-api-translator 0.28.0 → 0.28.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.
@@ -32,11 +32,15 @@ const DUMMY_COMMON = {
32
32
  parent: DUMMY_PARENT,
33
33
  };
34
34
 
35
+ type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
36
+ O,
37
+ Exclude<$Keys<O>, K>,
38
+ >;
35
39
  function constructFlowNode<T: FlowESTree.BaseNode>(
36
- node: $Diff<T, FlowESTree.BaseNode>,
40
+ node: LooseOmit<NoInfer<T>, 'parent'>,
37
41
  ): T {
38
42
  return {
39
- ...node,
43
+ ...(node: $FlowFixMe),
40
44
  ...DUMMY_COMMON,
41
45
  };
42
46
  }
@@ -42,7 +42,6 @@ const DUMMY_LOC = {
42
42
  };
43
43
 
44
44
  function constructFlowNode(node) {
45
- // $FlowFixMe[prop-missing]
46
45
  return node;
47
46
  }
48
47
 
@@ -35,11 +35,14 @@ const DUMMY_LOC: FlowESTree.SourceLocation = {
35
35
  end: {line: 1, column: 0},
36
36
  };
37
37
 
38
+ type LooseOmit<O: interface {}, K: $Keys<$FlowFixMe>> = Pick<
39
+ O,
40
+ Exclude<$Keys<O>, K>,
41
+ >;
38
42
  function constructFlowNode<T: FlowESTree.BaseNode>(
39
- node: $Diff<T, FlowESTree.BaseNode>,
43
+ node: LooseOmit<NoInfer<T>, 'parent'>,
40
44
  ): T {
41
- // $FlowFixMe[prop-missing]
42
- return node;
45
+ return (node: $FlowFixMe);
43
46
  }
44
47
 
45
48
  const cloneJSDocCommentsToNewNode =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flow-api-translator",
3
- "version": "0.28.0",
3
+ "version": "0.28.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.28.0",
17
- "hermes-estree": "0.28.0",
18
- "hermes-parser": "0.28.0",
19
- "hermes-transform": "0.28.0",
16
+ "hermes-eslint": "0.28.1",
17
+ "hermes-estree": "0.28.1",
18
+ "hermes-parser": "0.28.1",
19
+ "hermes-transform": "0.28.1",
20
20
  "typescript": "5.3.2"
21
21
  },
22
22
  "peerDependencies": {