mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Added aurelia-knockout 2.0.0 (#14880)
* added aurelia-knockout 2.0.0 * fixed tslint errors in aurelia-knockout
This commit is contained in:
parent
8d1cf56e25
commit
ea79711677
11
aurelia-knockout/aurelia-knockout-tests.ts
Normal file
11
aurelia-knockout/aurelia-knockout-tests.ts
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
export class ViewModel {
|
||||
|
||||
constructor(private knockoutBindable: KnockoutBindable) {
|
||||
}
|
||||
|
||||
activate(settings: any): void {
|
||||
this.knockoutBindable.applyBindableValues(settings, this);
|
||||
this.knockoutBindable.applyBindableValues(settings, this, true);
|
||||
}
|
||||
}
|
||||
19
aurelia-knockout/index.d.ts
vendored
Normal file
19
aurelia-knockout/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for aurelia-knockout 2.0
|
||||
// Project: https://github.com/code-chris/aurelia-knockout
|
||||
// Definitions by: Christian Kotzbauer <https://github.com/code-chris>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare interface KnockoutBindable {
|
||||
|
||||
/**
|
||||
* Applys all values from a data object (usually the activation data) to the corresponding instance fields
|
||||
* in the current view model if they are marked as @bindable. By default all matching values from the data object
|
||||
* are applied. To only apply observable values set the last parameter to `true`. Subscriptions are created
|
||||
* for all Knockout observables in the data object to update the view-model values respectively.
|
||||
*
|
||||
* @param data - the data object
|
||||
* @param target - the target view model
|
||||
* @param applyOnlyObservables - `true` if only observable values should be applied, false by default.
|
||||
*/
|
||||
applyBindableValues(data: any, target: any, applyOnlyObservables?: boolean): void;
|
||||
}
|
||||
23
aurelia-knockout/tsconfig.json
Normal file
23
aurelia-knockout/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"aurelia-knockout-tests.ts"
|
||||
]
|
||||
}
|
||||
1
aurelia-knockout/tslint.json
Normal file
1
aurelia-knockout/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user