Skip to content

Commit 6361347

Browse files
committed
Add typings
Update CHANGELOG Up the version
1 parent 2880024 commit 6361347

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="2.0.14 beta"></a>
2+
## [2.0.14 beta](https://github.com/NativeScript/theme/compare/v2.0.13...v2.0.14) (2019-09-03)
3+
4+
### Features
5+
6+
* Add typings to make Angular projects in Playground happy
7+
8+
### Fixes
9+
10+
* Fix setMode resets the classes set manually on root
11+
112
<a name="2.0.13 beta"></a>
213
## [2.0.13 beta](https://github.com/NativeScript/theme/compare/v2.0.12...v2.0.13) (2019-09-03)
314

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"name": "nativescript-theme-core",
3-
"version": "2.0.13",
3+
"version": "2.0.14",
44
"description": "Telerik NativeScript Core Theme",
55
"author": "Telerik <support@telerik.com>",
66
"homepage": "https://www.nativescript.org",
77
"license": "Apache-2.0",
8+
"main": "index",
9+
"typings": "index.d.ts",
810
"repository": {
911
"type": "git",
1012
"url": "https://github.com/NativeScript/theme"

scripts/builder.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const transform = babel.transform(fs.readFileSync("./src/index.js"), {
4141

4242
fs.writeFile("./nativescript-theme-core/index.js", transform.code, {}, () => {});
4343

44+
// Copy typings
45+
copyFile("./index.d.ts", "./nativescript-theme-core/index.d.ts");
46+
4447
// Copy our Readme
4548
copyFile("./README.md", "./nativescript-theme-core/README.md");
4649
copyFile("./CHANGELOG.md", "./nativescript-theme-core/CHANGELOG.md");

src/index.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export class ClassList {
2+
add(...classes: Array<string>): ClassList;
3+
remove(...classes: Array<string>): ClassList;
4+
get(): string;
5+
}
6+
7+
export class Theme {
8+
public static Light: string;
9+
public static Dark: string;
10+
11+
public static setMode(mode?: string, root?: any): undefined;
12+
public static toggleMode(isDark?: boolean): undefined;
13+
public static getMode(): string;
14+
}
15+
16+
export default Theme;
17+

0 commit comments

Comments
 (0)