@@ -209,21 +209,21 @@ let angular: {
209
209
element : ( e : Element | string ) => IAugmentedJQuery ,
210
210
version : { major : number } , resumeBootstrap ?: ( ) => void ,
211
211
getTestability : ( e : Element ) => ITestabilityService
212
+ } = < any > {
213
+ bootstrap : noNg ,
214
+ module : noNg ,
215
+ element : noNg ,
216
+ version : noNg ,
217
+ resumeBootstrap : noNg ,
218
+ getTestability : noNg
212
219
} ;
213
220
214
221
try {
215
222
if ( window . hasOwnProperty ( 'angular' ) ) {
216
- setAngularLib ( ( < any > window ) . angular ) ;
223
+ angular = ( < any > window ) . angular ;
217
224
}
218
225
} catch ( e ) {
219
- setAngularLib ( < any > {
220
- bootstrap : noNg ,
221
- module : noNg ,
222
- element : noNg ,
223
- version : noNg ,
224
- resumeBootstrap : noNg ,
225
- getTestability : noNg
226
- } ) ;
226
+ // ignore in CJS mode.
227
227
}
228
228
229
229
/**
@@ -246,25 +246,17 @@ export function getAngularLib(): any {
246
246
return angular ;
247
247
}
248
248
249
- export function bootstrap (
250
- e : Element , modules : ( string | IInjectable ) [ ] , config : IAngularBootstrapConfig ) : void {
251
- angular . bootstrap ( e , modules , config ) ;
252
- }
249
+ export const bootstrap =
250
+ ( e : Element , modules : ( string | IInjectable ) [ ] , config : IAngularBootstrapConfig ) : void =>
251
+ angular . bootstrap ( e , modules , config ) ;
253
252
254
- export function module ( prefix : string , dependencies ?: string [ ] ) : IModule {
255
- return angular . module ( prefix , dependencies ) ;
256
- }
253
+ export const module = ( prefix : string , dependencies ?: string [ ] ) : IModule =>
254
+ angular . module ( prefix , dependencies ) ;
257
255
258
- export function element ( e : Element | string ) : IAugmentedJQuery {
259
- return angular . element ( e ) ;
260
- }
256
+ export const element = ( e : Element | string ) : IAugmentedJQuery => angular . element ( e ) ;
261
257
262
- export function resumeBootstrap ( ) : void {
263
- angular . resumeBootstrap ( ) ;
264
- }
258
+ export const resumeBootstrap = ( ) : void => angular . resumeBootstrap ( ) ;
265
259
266
- export function getTestability ( e : Element ) : ITestabilityService {
267
- return angular . getTestability ( e ) ;
268
- }
260
+ export const getTestability = ( e : Element ) : ITestabilityService => angular . getTestability ( e ) ;
269
261
270
262
export const version = angular . version ;
0 commit comments