Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit 5463302

Browse files
committed
create new function type names
related with #137
1 parent 9c97404 commit 5463302

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/TypeScriptGenerator.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,18 @@ function getOldFragmentTypeName(name: string) {
10391039
return `${name}$ref`;
10401040
}
10411041

1042+
function getNewFragmentTypeName(name: string) {
1043+
return `${name}$fragmentType`;
1044+
}
1045+
1046+
function getRefTypeName(name: string): string {
1047+
return `${name}$key`;
1048+
}
1049+
1050+
function getDataTypeName(name: string): string {
1051+
return `${name}$data`;
1052+
}
1053+
10421054
// Should match FLOW_TRANSFORMS array
10431055
// https://github.com/facebook/relay/blob/v6.0.0/packages/relay-compiler/language/javascript/RelayFlowGenerator.js#L621-L627
10441056
export const transforms: TypeGenerator["transforms"] = [

0 commit comments

Comments
 (0)