add typescript definition compilation checks on every test run

This commit is contained in:
blagoev 2017-09-13 12:59:13 +03:00
parent f7db865458
commit 8ba71e36c7
2 changed files with 6 additions and 4 deletions

2
lib/index.d.ts vendored
View File

@ -451,7 +451,7 @@ declare class Realm {
* @param {Function} callback will be called when the realm is ready.
* @param {ProgressNotificationCallback} progressCallback? a progress notification callback for 'download' direction and 'forCurrentlyOutstandingWork' mode
*/
static openAsync(config: Realm.Configuration, callback: (error: any, realm: Realm) => void, progressCallback?: Realm.Sync.ProgressNotificationCallback): void
static openAsync(config: Realm.Configuration, hello?: string, callback: (error: any, realm: Realm) => void, progressCallback?: Realm.Sync.ProgressNotificationCallback): void
/**
* Delete the Realm file for the given configuration.

View File

@ -10,10 +10,12 @@
"needle": "^1.3.0",
"terminate": "^1.0.8",
"tmp": "^0.0.30",
"url-parse": "^1.1.7"
"url-parse": "^1.1.7",
"typescript": "^2.5.2"
},
"scripts": {
"test": "jasmine spec/unit_tests.js",
"test-sync-integration": "jasmine spec/sync_integration_tests.js"
"check-typescript" : "tsc --noEmit --alwaysStrict ./../lib/index.d.ts",
"test": "npm run check-typescript && jasmine spec/unit_tests.js",
"test-sync-integration": "npm run check-typescript && jasmine spec/sync_integration_tests.js"
}
}