@@ -19,9 +19,7 @@ import { createMonacoEditorAPI } from 'vs/editor/standalone/browser/standaloneEd
1919import { createMonacoLanguagesAPI } from 'vs/editor/standalone/browser/standaloneLanguages' ;
2020import { EDITOR_DEFAULTS , WrappingIndent } from 'vs/editor/common/config/editorOptions' ;
2121
22- declare var exports : any ;
2322var global : any = self ;
24- global . monaco = exports ;
2523
2624// When missing, polyfill the native promise
2725// with our winjs-based polyfill
@@ -36,14 +34,25 @@ if (typeof global.Promise === 'undefined') {
3634( < any > EDITOR_DEFAULTS . viewInfo ) . glyphMargin = false ;
3735( < any > EDITOR_DEFAULTS ) . autoIndent = false ;
3836
39- let base = createMonacoBaseAPI ( ) ;
40- for ( let prop in base ) {
41- if ( base . hasOwnProperty ( prop ) ) {
42- exports [ prop ] = ( base as any ) [ prop ] ;
43- }
44- }
45- exports . editor = createMonacoEditorAPI ( ) ;
46- exports . languages = createMonacoLanguagesAPI ( ) ;
37+ const api = createMonacoBaseAPI ( ) ;
38+ api . editor = createMonacoEditorAPI ( ) ;
39+ api . languages = createMonacoLanguagesAPI ( ) ;
40+ export const CancellationTokenSource = api . CancellationTokenSource ;
41+ export const Emitter = api . Emitter ;
42+ export const KeyCode = api . KeyCode ;
43+ export const KeyMod = api . KeyMod ;
44+ export const Position = api . Position ;
45+ export const Range = api . Range ;
46+ export const Selection = api . Selection ;
47+ export const SelectionDirection = api . SelectionDirection ;
48+ export const Severity = api . Severity ;
49+ export const Promise = api . Promise ;
50+ export const Uri = api . Uri ;
51+ export const Token = api . Token ;
52+ export const editor = api . editor ;
53+ export const languages = api . languages ;
54+
55+ global . monaco = api ;
4756
4857if ( typeof global . require !== 'undefined' && typeof global . require . config === 'function' ) {
4958 global . require . config ( {
0 commit comments