Knockout put current version in root (#47255)

* Put current version of knockout in the root

Previously, the code that supports the oldest version of Typescript was in the root: 3.1 and below. Newer versions were in ts*/ subdirectories.

This PR puts the newest version in the root, and older versions -- before 4.0 in this case -- in ts*/ subdirectories. This is possible because all supported versions of the Typescript now understand the typesVersions property in package.json.

This PR needs a new version of DefinitelyTyped-tools and dtslint, which I will ship soon. It also needs to be brought up to date with master.

* Delete ts4.0/
This commit is contained in:
Nathan Shively-Sanders 2020-09-03 08:12:54 -07:00 committed by GitHub
parent 6a3556a1bc
commit ed36b1aa90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 3 additions and 17 deletions

View File

@ -10,7 +10,6 @@
// Retsam <https://github.com/Retsam>
// Rey Pena <https://github.com/ReyPena>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
interface KnockoutSubscribableFunctions<T> {
/**
@ -286,6 +285,7 @@ interface KnockoutObservableStatic {
fn: KnockoutObservableFunctions<any>;
<T>(value: T): KnockoutObservable<T>;
<T>(value: any): KnockoutObservable<T>;
<T = any>(value: null): KnockoutObservable<T | null>
<T = any>(): KnockoutObservable<T | undefined>
}

View File

@ -2,9 +2,9 @@
"private": true,
"types": "index",
"typesVersions": {
">=4.0.0-0": {
"<=3.9": {
"*": [
"ts4.0/*"
"ts3.9/*"
]
}
}

View File

@ -1,16 +1,3 @@
// Type definitions for Knockout v3.4.0
// Project: http://knockoutjs.com
// Definitions by: Boris Yankov <https://github.com/borisyankov>,
// Igor Oleinikov <https://github.com/Igorbek>,
// Clément Bourgeois <https://github.com/moonpyk>,
// Matt Brooks <https://github.com/EnableSoftware>,
// Benjamin Eckardt <https://github.com/BenjaminEckardt>,
// Mathias Lorenzen <https://github.com/ffMathy>,
// Leonardo Lombardi <https://github.com/ltlombardi>
// Retsam <https://github.com/Retsam>
// Rey Pena <https://github.com/ReyPena>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface KnockoutSubscribableFunctions<T> {
/**
* Notify subscribers of knockout "change" event. This doesn't actually change the observable value.
@ -285,7 +272,6 @@ interface KnockoutObservableStatic {
fn: KnockoutObservableFunctions<any>;
<T>(value: T): KnockoutObservable<T>;
<T>(value: any): KnockoutObservable<T>;
<T = any>(value: null): KnockoutObservable<T | null>
<T = any>(): KnockoutObservable<T | undefined>
}