mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Stronger typing for the options
This commit is contained in:
parent
bad4bcfe35
commit
00036c08f3
4 changed files with 24 additions and 4 deletions
|
|
@ -152,6 +152,11 @@ export const languagesArr: IFeatureDefinition[] = ${
|
|||
.replace(/"id":/g, 'id:')
|
||||
.replace(/"/g, '\'')
|
||||
};
|
||||
|
||||
export type EditorLanguage = ${
|
||||
result.map(el => `'${el.label}'`).join(' | ')
|
||||
};
|
||||
|
||||
`
|
||||
fs.writeFileSync(path.join(__dirname, '../src/languages.ts'), code.replace(/\r\n/g, '\n'));
|
||||
});
|
||||
|
|
@ -232,6 +237,14 @@ export const featuresArr: IFeatureDefinition[] = ${
|
|||
.replace(/"entry":/g, 'entry:')
|
||||
.replace(/"/g, '\'')
|
||||
};
|
||||
|
||||
export type EditorFeature = ${
|
||||
result.map(el => `'${el.label}'`).join(' | ')
|
||||
};
|
||||
|
||||
export type NegatedEditorFeature = ${
|
||||
result.map(el => `'!${el.label}'`).join(' | ')
|
||||
};
|
||||
`
|
||||
fs.writeFileSync(path.join(__dirname, '../src/features.ts'), code.replace(/\r\n/g, '\n'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue