@@ -214,11 +214,11 @@ export interface INgModelController {
214214 $name : string ;
215215}
216216
217- function noNg ( ) {
217+ function noNg ( ) : never {
218218 throw new Error ( 'AngularJS v1.x is not loaded!' ) ;
219219}
220220
221- const noNgElement : typeof angular . element = ( e => noNg ( ) ) as typeof angular . element ;
221+ const noNgElement : typeof angular . element = ( ) => noNg ( ) ;
222222noNgElement . cleanData = noNg ;
223223
224224let angular : {
@@ -232,11 +232,11 @@ let angular: {
232232 version : { major : number } ,
233233 resumeBootstrap : ( ) => void ,
234234 getTestability : ( e : Element ) => ITestabilityService
235- } = < any > {
235+ } = {
236236 bootstrap : noNg ,
237237 module : noNg ,
238238 element : noNgElement ,
239- version : undefined ,
239+ version : undefined as any ,
240240 resumeBootstrap : noNg ,
241241 getTestability : noNg
242242} ;
@@ -286,10 +286,8 @@ export const bootstrap: typeof angular.bootstrap = (e, modules, config?) =>
286286export const module : typeof angular . module = ( prefix , dependencies ?) =>
287287 angular . module ( prefix , dependencies ) ;
288288
289- const angularElement : typeof angular . element = ( e => angular . element ( e ) ) as typeof angular . element ;
290- angularElement . cleanData = nodes => angular . element . cleanData ( nodes ) ;
291-
292- export const element : typeof angular . element = angularElement ;
289+ export const element : typeof angular . element = e => angular . element ( e ) ;
290+ element . cleanData = nodes => angular . element . cleanData ( nodes ) ;
293291
294292export const resumeBootstrap : typeof angular . resumeBootstrap = ( ) => angular . resumeBootstrap ( ) ;
295293
0 commit comments