Skip to content

Commit

Permalink
Added type-level mapping between aliases and nodes that have that ali…
Browse files Browse the repository at this point in the history
…as. (#9110)
  • Loading branch information
cameron-martin authored and nicolo-ribaudo committed Dec 19, 2018
1 parent 911c2d0 commit 9e95da4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/generators/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ for (const type in t.FLIPPED_ALIAS_KEYS) {
.map(type => `${type}`)
.join(" | ")};\n`;
}
code += "\n";

code += "export interface Aliases {\n";
for (const type in t.FLIPPED_ALIAS_KEYS) {
code += ` ${type}: ${type};\n`;
}
code += "}\n\n";

code += lines.join("\n") + "\n";

Expand Down

0 comments on commit 9e95da4

Please sign in to comment.