declare proposed API properties for package.json and link them with actual proposal names

This commit is contained in:
Johannes Rieken
2021-11-10 12:34:07 +01:00
parent 50978960a0
commit fe6b867b00
4 changed files with 20 additions and 3 deletions

View File

@@ -239,9 +239,10 @@ function apiProposalNamesGenerator() {
'',
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const apiProposals = {',
'const apiProposals = {',
`${proposalNames.map(name => `\t${name}: true`).join(',\n')}`,
'};',
'export const apiProposalNames = Object.freeze(Object.keys(apiProposals));',
'export type ApiProposalName = keyof typeof apiProposals;',
'',
].join('\n');