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:
Hristo Deshev
2017-03-02 13:50:23 +02:00
committed by Hristo Deshev
parent 1af8c6ca8e
commit b45cbe929b
230 changed files with 9170 additions and 10028 deletions

View File

@@ -1,30 +1,28 @@
/**
* Allows you to capture the frames-per-second metrics of your application.
*/
declare module "fps-meter" {
/**
* Starts the frames-per-second meter.
*/
export function start(): void;
/**
* Starts the frames-per-second meter.
*/
export function start(): void;
/**
* Stops the frames-per-second meter.
*/
export function stop(): void;
/**
* Stops the frames-per-second meter.
*/
export function stop(): void;
/**
* Returns a valid indicating whether the frames-per-second meter is currently running.
*/
export function running(): boolean;
/**
* Returns a valid indicating whether the frames-per-second meter is currently running.
*/
export function running(): boolean;
/**
* Adds a callback function to be called each time FPS data is due to be reported. Returns an unique id which can be used to remove this callback later.
*/
export function addCallback(callback: (fps: number, minFps?: number) => void): number;
/**
* Adds a callback function to be called each time FPS data is due to be reported. Returns an unique id which can be used to remove this callback later.
*/
export function addCallback(callback: (fps: number, minFps?: number) => void): number;
/**
* Removes the callback with the specified id.
*/
export function removeCallback(id: number);
}
/**
* Removes the callback with the specified id.
*/
export function removeCallback(id: number);

View File

@@ -1,28 +1,26 @@
declare module "fps-meter/fps-native" {

/**
* An utility class used to measure frames per second.
*/
export class FPSCallback {
/**
* An utility class used to measure frames per second.
* Initializes a new instance of FPSCallback class.
*/
export class FPSCallback {
constructor(onFrame: (currentTimeMillis: number) => void);
/**
* Initializes a new instance of FPSCallback class.
*/
constructor(onFrame: (currentTimeMillis: number) => void);
/**
* Starts the frame per seconds measurement.
*/
start(): void;
/**
* Starts the frame per seconds measurement.
*/
start(): void;
/**
* Stops the frame per seconds measurement.
*/
stop(): void;
/**
* Stops the frame per seconds measurement.
*/
stop(): void;
/**
* Gets if the current instance of FPSCallback is running.
*/
running: boolean;
}
}
/**
* Gets if the current instance of FPSCallback is running.
*/
running: boolean;
}

View File

@@ -1,6 +1,7 @@
{
"name" : "fps-meter",
"main" : "fps-meter",
"nativescript": {}
"name" : "fps-meter",
"main" : "fps-meter",
"types": "fps-meter.d.ts",
"nativescript": {}
}