mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
No more ambient modules for tns-core-modules/* subpackages.
- Use path mappings in tsconfig.json to resolve module typings - Only use ambient mobules for global API's - Move single-file modules to a subdir with the same name so that we can provide a hand-written typing next to it (via package.json) - Delete all mentions of tns-core-modules.d.ts - Delete reference d.ts assembly build steps. Not needed anymore. - HACK! Use a <reference> for global typings in application.d.ts to avoid publishing a separate @types/tns-core-modules package. - Rename declarations.d.ts to tns-core-modules.d.ts to preserve JS project mappings in references.d.ts (the only place we use those)
This commit is contained in:
committed by
Hristo Deshev
parent
1af8c6ca8e
commit
b45cbe929b
128
tns-core-modules/utils/debug.d.ts
vendored
128
tns-core-modules/utils/debug.d.ts
vendored
@@ -1,67 +1,65 @@
|
||||
declare module "utils/debug" {
|
||||
/**
|
||||
* A runtime option indicating whether the build has debugging enabled.
|
||||
*/
|
||||
export var debug: boolean;
|
||||
|
||||
/**
|
||||
* A class encapsulating information for source code origin.
|
||||
*/
|
||||
export class Source {
|
||||
|
||||
/**
|
||||
* Creates a new Source instance by given uri, line and column.
|
||||
*/
|
||||
constructor(uri: string, line: number, column: number);
|
||||
|
||||
/**
|
||||
* Gets the URI of the source document;
|
||||
*/
|
||||
uri: string;
|
||||
|
||||
/**
|
||||
* Gets the line in the source document.
|
||||
*/
|
||||
line: number;
|
||||
|
||||
/**
|
||||
* Gets the position in the source document.
|
||||
*/
|
||||
column: number;
|
||||
|
||||
/**
|
||||
* Get the source of an object.
|
||||
*/
|
||||
public static get(object: any): Source;
|
||||
|
||||
/**
|
||||
* Set the source of an object.
|
||||
*/
|
||||
public static set(object: any, src: Source);
|
||||
}
|
||||
|
||||
/**
|
||||
* An Error class that provides additional context to an error.
|
||||
*/
|
||||
export class ScopeError extends Error {
|
||||
/**
|
||||
* Creates a new ScopeError providing addtional context to the child error.
|
||||
* @param child The child error to extend.
|
||||
* @param message Additional message to prepend to the child error.
|
||||
*/
|
||||
constructor(child: Error, message?: string);
|
||||
}
|
||||
/**
|
||||
* A runtime option indicating whether the build has debugging enabled.
|
||||
*/
|
||||
export var debug: boolean;
|
||||
|
||||
/**
|
||||
* Represents a scope error providing addiot
|
||||
*/
|
||||
export class SourceError extends ScopeError {
|
||||
/**
|
||||
* Creates a new SourceError by child error, source and optional message.
|
||||
* @param child The child error to extend.
|
||||
* @param source The source where the error occured.
|
||||
* @param message Additonal message to prepend along the source location and the child error's message.
|
||||
*/
|
||||
constructor(child: Error, source: Source, message?: string);
|
||||
}
|
||||
/**
|
||||
* A class encapsulating information for source code origin.
|
||||
*/
|
||||
export class Source {
|
||||
|
||||
/**
|
||||
* Creates a new Source instance by given uri, line and column.
|
||||
*/
|
||||
constructor(uri: string, line: number, column: number);
|
||||
|
||||
/**
|
||||
* Gets the URI of the source document;
|
||||
*/
|
||||
uri: string;
|
||||
|
||||
/**
|
||||
* Gets the line in the source document.
|
||||
*/
|
||||
line: number;
|
||||
|
||||
/**
|
||||
* Gets the position in the source document.
|
||||
*/
|
||||
column: number;
|
||||
|
||||
/**
|
||||
* Get the source of an object.
|
||||
*/
|
||||
public static get(object: any): Source;
|
||||
|
||||
/**
|
||||
* Set the source of an object.
|
||||
*/
|
||||
public static set(object: any, src: Source);
|
||||
}
|
||||
|
||||
/**
|
||||
* An Error class that provides additional context to an error.
|
||||
*/
|
||||
export class ScopeError extends Error {
|
||||
/**
|
||||
* Creates a new ScopeError providing addtional context to the child error.
|
||||
* @param child The child error to extend.
|
||||
* @param message Additional message to prepend to the child error.
|
||||
*/
|
||||
constructor(child: Error, message?: string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a scope error providing addiot
|
||||
*/
|
||||
export class SourceError extends ScopeError {
|
||||
/**
|
||||
* Creates a new SourceError by child error, source and optional message.
|
||||
* @param child The child error to extend.
|
||||
* @param source The source where the error occured.
|
||||
* @param message Additonal message to prepend along the source location and the child error's message.
|
||||
*/
|
||||
constructor(child: Error, source: Source, message?: string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user