mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Adopt native promises
This commit is contained in:
parent
03a82594d2
commit
35c57b5990
50 changed files with 54 additions and 204 deletions
|
|
@ -6,13 +6,10 @@
|
|||
|
||||
import { registerLanguage } from '../_.contribution';
|
||||
|
||||
// Allow for running under nodejs/requirejs in tests
|
||||
const _monaco: typeof monaco = (typeof monaco === 'undefined' ? (<any>self).monaco : monaco);
|
||||
|
||||
registerLanguage({
|
||||
id: 'typescript',
|
||||
extensions: ['.ts', '.tsx'],
|
||||
aliases: ['TypeScript', 'ts', 'typescript'],
|
||||
mimetypes: ['text/typescript'],
|
||||
loader: () => _monaco.Promise.wrap(<Promise<any>>import('./typescript'))
|
||||
loader: () => <Promise<any>>import('./typescript')
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue