Skip to content

Commit

Permalink
Merge pull request joarwilk#172 from yradchen/types/regex
Browse files Browse the repository at this point in the history
fix: change Typecript RegExpMatchArray to Flow RegExp$matchResult
  • Loading branch information
orta authored Jan 25, 2022
2 parents c2a6f9c + 77f19a0 commit 796e7f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/__tests__/__snapshots__/basic.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ exports[`should handle basic keywords 1`] = `
u: Symbol,
v: [1, 2, 3],
w: $ReadOnlyArray<string>,
x: RegExp$matchResult,
...
};
"
Expand Down Expand Up @@ -53,6 +54,7 @@ exports[`should handle basic keywords 2`] = `
u: Symbol,
v: [1, 2, 3],
w: $ReadOnlyArray<string>,
x: RegExp$matchResult,
|};
"
`;
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/basic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ it("should handle basic keywords", () => {
u: unique symbol,
v: readonly [1, 2, 3],
w: readonly string[],
x: RegExpMatchArray
}`;

{
Expand Down
1 change: 1 addition & 0 deletions src/printers/identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Object.assign(identifiers, {
ReadonlySet: "$ReadOnlySet",
ReadonlyMap: "$ReadOnlyMap",
Readonly: "$ReadOnly",
RegExpMatchArray: "RegExp$matchResult",
NonNullable: "$NonMaybeType",
Partial: ([type]: any[]) => {
const isInexact = opts().inexact;
Expand Down

0 comments on commit 796e7f1

Please sign in to comment.