mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(docs): Move NativeScriptError declaration to a separate file (#6927)
It is used by `application.d.ts` and needs to be documented. The reason that it wasn't included in the documentation by now is that `tns-core-modules.d.ts` (which imports `module.d.ts`) defines types which are part of the internal modules and runtimes APIs. As such they are excluded from the generation of API documentation.
This commit is contained in:
committed by
Alexander Vakrilov
parent
f698827334
commit
5449cfa238
@@ -39,7 +39,7 @@ import {
|
|||||||
iOSApplication,
|
iOSApplication,
|
||||||
LoadAppCSSEventData,
|
LoadAppCSSEventData,
|
||||||
UnhandledErrorEventData,
|
UnhandledErrorEventData,
|
||||||
DiscardedErrorEventData
|
DiscardedErrorEventData,
|
||||||
} from "./application";
|
} from "./application";
|
||||||
|
|
||||||
export { UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData };
|
export { UnhandledErrorEventData, DiscardedErrorEventData, CssChangedEventData, LoadAppCSSEventData };
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
* Contains the application abstraction with all related methods.
|
* Contains the application abstraction with all related methods.
|
||||||
* @module "application"
|
* @module "application"
|
||||||
*/ /** */
|
*/ /** */
|
||||||
|
/// <reference path="../nativescript-error.d.ts" />
|
||||||
|
|
||||||
///<reference path="../tns-core-modules.d.ts" /> Include global typings
|
|
||||||
import { NavigationEntry, View, Observable, EventData } from "../ui/frame";
|
import { NavigationEntry, View, Observable, EventData } from "../ui/frame";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
11
tns-core-modules/module.d.ts
vendored
11
tns-core-modules/module.d.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/// <reference path="./nativescript-error.d.ts" />
|
||||||
declare var global: NodeJS.Global;
|
declare var global: NodeJS.Global;
|
||||||
|
|
||||||
interface ModuleResolver {
|
interface ModuleResolver {
|
||||||
@@ -86,16 +87,6 @@ interface ModuleContext {
|
|||||||
path: string;
|
path: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* An extended JavaScript Error which will have the nativeError property initialized in case the error is caused by executing platform-specific code.
|
|
||||||
*/
|
|
||||||
interface NativeScriptError extends Error {
|
|
||||||
/**
|
|
||||||
* Represents the native error object.
|
|
||||||
*/
|
|
||||||
nativeError: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Define a minimal subset of NodeRequire and NodeModule so user apps can compile without
|
// Define a minimal subset of NodeRequire and NodeModule so user apps can compile without
|
||||||
// installing @types/node
|
// installing @types/node
|
||||||
|
|
||||||
|
|||||||
9
tns-core-modules/nativescript-error.d.ts
vendored
Normal file
9
tns-core-modules/nativescript-error.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* An extended JavaScript Error which will have the nativeError property initialized in case the error is caused by executing platform-specific code.
|
||||||
|
*/
|
||||||
|
declare interface NativeScriptError extends Error {
|
||||||
|
/**
|
||||||
|
* Represents the native error object.
|
||||||
|
*/
|
||||||
|
nativeError: any;
|
||||||
|
}
|
||||||
1
tns-core-modules/ui/core/view/view.d.ts
vendored
1
tns-core-modules/ui/core/view/view.d.ts
vendored
@@ -2,7 +2,6 @@
|
|||||||
* @module "ui/core/view"
|
* @module "ui/core/view"
|
||||||
*/ /** */
|
*/ /** */
|
||||||
|
|
||||||
///<reference path="../../../tns-core-modules.d.ts" /> Include global typings
|
|
||||||
import { ViewBase, Property, InheritedProperty, EventData, Color } from "../view-base";
|
import { ViewBase, Property, InheritedProperty, EventData, Color } from "../view-base";
|
||||||
import { Animation, AnimationDefinition, AnimationPromise } from "../../animation";
|
import { Animation, AnimationDefinition, AnimationPromise } from "../../animation";
|
||||||
import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength } from "../../styling/style-properties";
|
import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength } from "../../styling/style-properties";
|
||||||
|
|||||||
1
tns-core-modules/ui/page/page.d.ts
vendored
1
tns-core-modules/ui/page/page.d.ts
vendored
@@ -3,7 +3,6 @@
|
|||||||
* @module "ui/page"
|
* @module "ui/page"
|
||||||
*/ /** */
|
*/ /** */
|
||||||
|
|
||||||
///<reference path="../../tns-core-modules.d.ts" /> Include global typings
|
|
||||||
import { ShownModallyData } from "../core/view";
|
import { ShownModallyData } from "../core/view";
|
||||||
import { ContentView, EventData, Property, Color, CssProperty, Style } from "../content-view";
|
import { ContentView, EventData, Property, Color, CssProperty, Style } from "../content-view";
|
||||||
import { Frame } from "../frame";
|
import { Frame } from "../frame";
|
||||||
|
|||||||
Reference in New Issue
Block a user