Skip to content

Commit da3cdc3

Browse files
Add definitions
Add tns-core-modules `.d.ts` files from modules 1.6.2. Add node.d.ts from version 4.2.x
1 parent 4990f91 commit da3cdc3

File tree

103 files changed

+12232
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+12232
-0
lines changed

definitions/node.d.ts

Lines changed: 2194 additions & 0 deletions
Large diffs are not rendered by default.

definitions/tns-core-modules/LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2015 Telerik AD
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* Allows you to save and restore any kind of information related to your application.
3+
*/
4+
declare module "application-settings" {
5+
/**
6+
* Checks whether such a key exists.
7+
* @param key The key to check for.
8+
*/
9+
export function hasKey(key: string): boolean;
10+
11+
/**
12+
* Gets a value (if existing) for a key as a Boolean Object. A default value can be provided in case there is no existing value.
13+
* @param key The key to check for.
14+
* @param defaultValue An optional value to be returned in case there is no existing value.
15+
*/
16+
export function getBoolean(key: string, defaultValue?: boolean): boolean;
17+
18+
/**
19+
* Gets a value (if existing) for a key as a String Object. A default value can be provided in case there is no existing value.
20+
* @param key The key to check for.
21+
* @param defaultValue An optional value to be returned in case there is no existing value.
22+
*/
23+
export function getString(key: string, defaultValue?: string): string;
24+
25+
/**
26+
* Gets a value (if existing) for a key as a Number Object. A default value can be provided in case there is no existing value.
27+
* @param key The key to check for.
28+
* @param defaultValue An optional value to be returned in case there is no existing value.
29+
*/
30+
export function getNumber(key: string, defaultValue?: number): number;
31+
32+
/**
33+
* Sets a Boolean Object for a key.
34+
* @param key The key.
35+
* @param value The value.
36+
*/
37+
export function setBoolean(key: string, value: boolean): void;
38+
39+
/**
40+
* Sets a String Object for a key.
41+
* @param key The key.
42+
* @param value The value.
43+
*/
44+
export function setString(key: string, value: string): void;
45+
46+
/**
47+
* Sets a Number Object for a key.
48+
* @param key The key.
49+
* @param value The value.
50+
*/
51+
export function setNumber(key: string, value: number): void;
52+
53+
/**
54+
* Removes a value (if existing) for a key.
55+
* @param key The key to check for.
56+
*/
57+
export function remove(key: string): void;
58+
}

0 commit comments

Comments
 (0)