mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Move module-related global declares to a separate file.
This commit is contained in:
9
declarations.d.ts
vendored
9
declarations.d.ts
vendored
@ -99,8 +99,7 @@ interface Console {
|
|||||||
}
|
}
|
||||||
|
|
||||||
declare var console: Console;
|
declare var console: Console;
|
||||||
declare var global;
|
declare var require: NativeScriptRequire;
|
||||||
declare var require;
|
|
||||||
|
|
||||||
// Global functions
|
// Global functions
|
||||||
declare function Deprecated(target: Object, key?: string | symbol, value?: any): void;
|
declare function Deprecated(target: Object, key?: string | symbol, value?: any): void;
|
||||||
@ -146,10 +145,6 @@ declare class WeakRef<T> {
|
|||||||
clear(): void;
|
clear(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module module {
|
declare var module: NativeScriptModule;
|
||||||
var id: string;
|
|
||||||
var filename: string;
|
|
||||||
var exports: any;
|
|
||||||
}
|
|
||||||
// Same as module.exports
|
// Same as module.exports
|
||||||
declare var exports: any;
|
declare var exports: any;
|
||||||
|
13
module.d.ts
vendored
Normal file
13
module.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//Base module declarations
|
||||||
|
//Not required in Angular apps since it clashes with its typings.
|
||||||
|
declare var global: any;
|
||||||
|
|
||||||
|
interface NativeScriptRequire {
|
||||||
|
(id: string): any;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare interface NativeScriptModule {
|
||||||
|
id: string;
|
||||||
|
filename: string;
|
||||||
|
exports: any;
|
||||||
|
}
|
Reference in New Issue
Block a user