-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
import type
in typescript for all imports
- Loading branch information
Showing
6 changed files
with
228 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ler/crates/relay-typegen/tests/generate_typescript_import_syntax/fixtures/simple.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
==================================== INPUT ==================================== | ||
fragment LinkedField on User { | ||
name | ||
profilePicture { | ||
uri | ||
width | ||
height | ||
} | ||
} | ||
==================================== OUTPUT =================================== | ||
import type { FragmentRefs } from "relay-runtime"; | ||
export type LinkedField$data = { | ||
readonly name: string | null; | ||
readonly profilePicture: { | ||
readonly height: number | null; | ||
readonly uri: string | null; | ||
readonly width: number | null; | ||
} | null; | ||
readonly " $fragmentType": "LinkedField"; | ||
}; | ||
export type LinkedField$key = { | ||
readonly " $data"?: LinkedField$data; | ||
readonly " $fragmentSpreads": FragmentRefs<"LinkedField">; | ||
}; |
8 changes: 8 additions & 0 deletions
8
...iler/crates/relay-typegen/tests/generate_typescript_import_syntax/fixtures/simple.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fragment LinkedField on User { | ||
name | ||
profilePicture { | ||
uri | ||
width | ||
height | ||
} | ||
} |
Oops, something went wrong.