cldrjs: Convert cldr.js-supplemental.d.ts to module augmentation, and include in tests (#13777)

This commit is contained in:
Andy
2017-01-06 06:34:42 -08:00
committed by GitHub
parent e1323d0c5e
commit c1bd558e85
3 changed files with 27 additions and 20 deletions
+15 -13
View File
@@ -15,19 +15,21 @@ Cldr.off("get", (path, value) => {
console.log(value);
});
const cldr = new Cldr("en");
{
const cldr = new Cldr("en");
cldr.on("get", (path, value) => {
console.log(path);
console.log(value);
});
cldr.on("get", (path, value) => {
console.log(path);
console.log(value);
});
cldr.once("get", (path, value) => {
console.log(path);
console.log(value);
});
cldr.once("get", (path, value) => {
console.log(path);
console.log(value);
});
cldr.off("get", (path, value) => {
console.log(path);
console.log(value);
});
cldr.off("get", (path, value) => {
console.log(path);
console.log(value);
});
}
+3 -1
View File
@@ -5,7 +5,9 @@
// The definition file for supplemental module.
declare namespace cldr {
import * as cldr from "cldrjs";
declare module "cldrjs" {
interface TimeDataStatic {
allowed(): string;
preferred(): string;
+9 -6
View File
@@ -1,12 +1,8 @@
{
"files": [
"index.d.ts",
"cldr.js-event-tests.ts"
],
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": true,
"noImplicitAny": false,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": "../",
@@ -16,5 +12,12 @@
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
},
"files": [
"index.d.ts",
"cldr.js-supplemental.d.ts",
"cldr.js-tests.ts",
"cldr.js-event-tests.ts",
"cldr.js-supplemental-tests.ts"
]
}