diff --git a/docs/diff/es2015.core.d.ts.md b/docs/diff/es2015.core.d.ts.md index b9e5ac9..c0f1876 100644 --- a/docs/diff/es2015.core.d.ts.md +++ b/docs/diff/es2015.core.d.ts.md @@ -91,7 +91,8 @@ Index: es2015.core.d.ts * target object. Returns the target object. * @param target The target object to copy to. - * @param source The source object from which to copy properties. -- */ ++ * @param sources One or more source objects from which to copy properties + */ - assign(target: T, source: U): T & U; - - /** @@ -112,30 +113,29 @@ Index: es2015.core.d.ts - * @param source3 The third source object from which to copy properties. - */ - assign( -- target: T, ++ assign( + target: T, - source1: U, - source2: V, - source3: W - ): T & U & V & W; -- -- /** -- * Copy the values of all of the enumerable own properties from one or more source objects to a -- * target object. Returns the target object. -- * @param target The target object to copy to. - * @param sources One or more source objects from which to copy properties - */ -- assign(target: object, ...sources: any[]): any; -+ assign( -+ target: CheckNonNullable, + ...sources: Ts + ): Intersect<[T, ...Ts]>; /** +- * Copy the values of all of the enumerable own properties from one or more source objects to a +- * target object. Returns the target object. +- * @param target The target object to copy to. +- * @param sources One or more source objects from which to copy properties +- */ +- assign(target: object, ...sources: any[]): any; +- +- /** * Returns an array of all symbol properties found directly on object o. * @param o Object to retrieve the symbols from. */ - getOwnPropertySymbols(o: any): symbol[]; -+ getOwnPropertySymbols(o: CheckNonNullable): symbol[]; ++ getOwnPropertySymbols(o: {}): symbol[]; /** * Returns the names of the enumerable string properties and methods of an object. diff --git a/docs/diff/es2017.object.d.ts.md b/docs/diff/es2017.object.d.ts.md index 9ce6196..6f43a9c 100644 --- a/docs/diff/es2017.object.d.ts.md +++ b/docs/diff/es2017.object.d.ts.md @@ -5,7 +5,7 @@ Index: es2017.object.d.ts =================================================================== --- es2017.object.d.ts +++ es2017.object.d.ts -@@ -2,34 +2,42 @@ +@@ -2,34 +2,44 @@ /** * Returns an array of values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. @@ -23,7 +23,7 @@ Index: es2017.object.d.ts + * Returns an array of values of the enumerable properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ -+ values(o: CheckNonNullable): unknown[]; ++ values(o: {}): unknown[]; /** * Returns an array of key/values of the enumerable properties of an object @@ -42,17 +42,18 @@ Index: es2017.object.d.ts + * Returns an array of key/values of the enumerable properties of an object + * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. + */ -+ entries(o: CheckNonNullable): [string, unknown][]; ++ entries(o: {}): [string, unknown][]; /** * Returns an object containing all own property descriptors of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - getOwnPropertyDescriptors( -- o: T ++ getOwnPropertyDescriptors( + o: T - ): { [P in keyof T]: TypedPropertyDescriptor } & { - [x: string]: PropertyDescriptor; -+ getOwnPropertyDescriptors(o: CheckNonNullable): { ++ ): { + [P in keyof T]: TypedPropertyDescriptor; + } & { + [x: PropertyKey]: PropertyDescriptor; diff --git a/docs/diff/es5.d.ts.md b/docs/diff/es5.d.ts.md index 6e2f566..ba90573 100644 --- a/docs/diff/es5.d.ts.md +++ b/docs/diff/es5.d.ts.md @@ -64,7 +64,7 @@ Index: es5.d.ts * @param o The object that references the prototype. */ - getPrototypeOf(o: any): any; -+ getPrototypeOf(o: CheckNonNullable): unknown; ++ getPrototypeOf(o: {}): unknown; /** * Gets the own property descriptor of the specified object. @@ -72,10 +72,9 @@ Index: es5.d.ts * @param o Object that contains the property. * @param p Name of the property. */ -- getOwnPropertyDescriptor( + getOwnPropertyDescriptor( - o: any, -+ getOwnPropertyDescriptor( -+ o: CheckNonNullable, ++ o: {}, p: PropertyKey ): PropertyDescriptor | undefined; @@ -85,7 +84,7 @@ Index: es5.d.ts * @param o Object that contains the own properties. */ - getOwnPropertyNames(o: any): string[]; -+ getOwnPropertyNames(o: CheckNonNullable): string[]; ++ getOwnPropertyNames(o: {}): string[]; /** * Creates an object that has the specified prototype or that has null prototype. @@ -3557,7 +3556,7 @@ Index: es5.d.ts } declare var Float64Array: Float64ArrayConstructor; -@@ -5536,4 +5418,31 @@ +@@ -5536,4 +5418,29 @@ locales?: string | string[], options?: Intl.DateTimeFormatOptions ): string; @@ -3578,8 +3577,6 @@ Index: es5.d.ts + ? S + : never; + -+type CheckNonNullable = [T] extends [null | undefined] ? never : T; -+ +type JSONValue = + | null + | string diff --git a/generated/lib.es2015.core.d.ts b/generated/lib.es2015.core.d.ts index 1c7fa70..f34b0e3 100644 --- a/generated/lib.es2015.core.d.ts +++ b/generated/lib.es2015.core.d.ts @@ -319,8 +319,8 @@ interface ObjectConstructor { * @param target The target object to copy to. * @param sources One or more source objects from which to copy properties */ - assign( - target: CheckNonNullable, + assign( + target: T, ...sources: Ts ): Intersect<[T, ...Ts]>; @@ -328,7 +328,7 @@ interface ObjectConstructor { * Returns an array of all symbol properties found directly on object o. * @param o Object to retrieve the symbols from. */ - getOwnPropertySymbols(o: CheckNonNullable): symbol[]; + getOwnPropertySymbols(o: {}): symbol[]; /** * Returns the names of the enumerable string properties and methods of an object. diff --git a/generated/lib.es2017.object.d.ts b/generated/lib.es2017.object.d.ts index 3e3845a..88da500 100644 --- a/generated/lib.es2017.object.d.ts +++ b/generated/lib.es2017.object.d.ts @@ -13,7 +13,7 @@ interface ObjectConstructor { * Returns an array of values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - values(o: CheckNonNullable): unknown[]; + values(o: {}): unknown[]; /** * Returns an array of key/values of the enumerable properties of an object @@ -29,13 +29,15 @@ interface ObjectConstructor { * Returns an array of key/values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - entries(o: CheckNonNullable): [string, unknown][]; + entries(o: {}): [string, unknown][]; /** * Returns an object containing all own property descriptors of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - getOwnPropertyDescriptors(o: CheckNonNullable): { + getOwnPropertyDescriptors( + o: T + ): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: PropertyKey]: PropertyDescriptor; diff --git a/generated/lib.es5.d.ts b/generated/lib.es5.d.ts index 4f50785..4b3c910 100644 --- a/generated/lib.es5.d.ts +++ b/generated/lib.es5.d.ts @@ -168,7 +168,7 @@ interface ObjectConstructor { * Returns the prototype of an object. * @param o The object that references the prototype. */ - getPrototypeOf(o: CheckNonNullable): unknown; + getPrototypeOf(o: {}): unknown; /** * Gets the own property descriptor of the specified object. @@ -176,8 +176,8 @@ interface ObjectConstructor { * @param o Object that contains the property. * @param p Name of the property. */ - getOwnPropertyDescriptor( - o: CheckNonNullable, + getOwnPropertyDescriptor( + o: {}, p: PropertyKey ): PropertyDescriptor | undefined; @@ -186,7 +186,7 @@ interface ObjectConstructor { * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. * @param o Object that contains the own properties. */ - getOwnPropertyNames(o: CheckNonNullable): string[]; + getOwnPropertyNames(o: {}): string[]; /** * Creates an object that has the specified prototype or that has null prototype. @@ -6810,8 +6810,6 @@ type Intersect = (( ? S : never; -type CheckNonNullable = [T] extends [null | undefined] ? never : T; - type JSONValue = | null | string diff --git a/lib/lib.es2015.core.d.ts b/lib/lib.es2015.core.d.ts index f05c504..a07223f 100644 --- a/lib/lib.es2015.core.d.ts +++ b/lib/lib.es2015.core.d.ts @@ -69,8 +69,8 @@ interface ObjectConstructor { * @param target The target object to copy to. * @param sources One or more source objects from which to copy properties */ - assign( - target: CheckNonNullable, + assign( + target: T, ...sources: Ts ): Intersect<[T, ...Ts]>; @@ -78,7 +78,7 @@ interface ObjectConstructor { * Returns an array of all symbol properties found directly on object o. * @param o Object to retrieve the symbols from. */ - getOwnPropertySymbols(o: CheckNonNullable): symbol[]; + getOwnPropertySymbols(o: {}): symbol[]; /** * Returns true if the values are the same value, false otherwise. diff --git a/lib/lib.es2017.object.d.ts b/lib/lib.es2017.object.d.ts index 49c1405..b4c2f70 100644 --- a/lib/lib.es2017.object.d.ts +++ b/lib/lib.es2017.object.d.ts @@ -13,7 +13,7 @@ interface ObjectConstructor { * Returns an array of values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - values(o: CheckNonNullable): unknown[]; + values(o: {}): unknown[]; /** * Returns an array of key/values of the enumerable properties of an object @@ -29,13 +29,15 @@ interface ObjectConstructor { * Returns an array of key/values of the enumerable properties of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - entries(o: CheckNonNullable): [string, unknown][]; + entries(o: {}): [string, unknown][]; /** * Returns an object containing all own property descriptors of an object * @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. */ - getOwnPropertyDescriptors(o: CheckNonNullable): { + getOwnPropertyDescriptors( + o: T + ): { [P in keyof T]: TypedPropertyDescriptor; } & { [x: PropertyKey]: PropertyDescriptor; diff --git a/lib/lib.es5.d.ts b/lib/lib.es5.d.ts index 8da3f5a..64a30bc 100644 --- a/lib/lib.es5.d.ts +++ b/lib/lib.es5.d.ts @@ -13,8 +13,6 @@ type Intersect = (( ? S : never; -type CheckNonNullable = [T] extends [null | undefined] ? never : T; - /** * Evaluates JavaScript code and executes it. * @param x A String value that contains valid JavaScript code. @@ -49,7 +47,7 @@ interface ObjectConstructor { * Returns the prototype of an object. * @param o The object that references the prototype. */ - getPrototypeOf(o: CheckNonNullable): unknown; + getPrototypeOf(o: {}): unknown; /** * Gets the own property descriptor of the specified object. @@ -57,8 +55,8 @@ interface ObjectConstructor { * @param o Object that contains the property. * @param p Name of the property. */ - getOwnPropertyDescriptor( - o: CheckNonNullable, + getOwnPropertyDescriptor( + o: {}, p: PropertyKey ): PropertyDescriptor | undefined; @@ -67,7 +65,7 @@ interface ObjectConstructor { * on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions. * @param o Object that contains the own properties. */ - getOwnPropertyNames(o: CheckNonNullable): string[]; + getOwnPropertyNames(o: {}): string[]; /** * Creates an object that has the specified prototype or that has null prototype. diff --git a/package-lock.json b/package-lock.json index 7e0a7c9..650b42c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "better-typescript-lib", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "better-typescript-lib", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "devDependencies": { "@jsdevtools/npm-publish": "^1.4.3", "@types/diff": "^5.0.2", - "@types/node": "^16.9.4", + "@types/node": "^16.9.6", "@types/prettier": "^2.6.0", "diff": "^5.0.0", "prettier": "^2.6.2", - "tsd": "^0.18.0", - "typescript": "^4.5.2" + "tsd": "^0.25.0", + "typescript": "^4.9.4" } }, "node_modules/@babel/code-frame": { @@ -190,6 +190,12 @@ "node": ">= 8" } }, + "node_modules/@tsd/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-70j1vy95LsMvciXWJLrQ9pQaaG1inJJ+gZ/dW/bPdzHUH1VTeSl3BBU6QxqFWh5IjPy6s7xHcUw45R71dw4J3w==", + "dev": true + }, "node_modules/@types/diff": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.2.tgz", @@ -225,9 +231,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "16.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz", - "integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA==", + "version": "16.18.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.9.tgz", + "integrity": "sha512-nhrqXYxiQ+5B/tPorWum37VgAiefi/wmfJ1QZKGKKecC8/3HqcTTJD0O+VABSPwtseMMF7NCPVT9uGgwn0YqsQ==", "dev": true }, "node_modules/@types/normalize-package-data": { @@ -1420,12 +1426,12 @@ } }, "node_modules/tsd": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.18.0.tgz", - "integrity": "sha512-UIkxm2CLmSjXlQs4zqxgVV9UmzK8VgJ63eBpgkH/ZsMkiUdzxxHvdCCg8F314HDxzfQl2muJEy/TEcXHIFIPXg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.25.0.tgz", + "integrity": "sha512-liUlvKtsdr+70XEZP/kkF6U8+Q9URZi4Pw58ih7a9x3kjJblG8rdVgvG62xcvkgRva1q3yWX5qAxfYZuYiC5CA==", "dev": true, "dependencies": { - "@tsd/typescript": "~4.4.3", + "@tsd/typescript": "~4.9.3", "eslint-formatter-pretty": "^4.1.0", "globby": "^11.0.1", "meow": "^9.0.0", @@ -1436,17 +1442,7 @@ "tsd": "dist/cli.js" }, "engines": { - "node": ">=12" - } - }, - "node_modules/tsd/node_modules/@tsd/typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-XNaotnbhU6sKSXYg9rVz4L9i9g+j+x1IIgMPztK8KumtMEsrLXcqPBKp/qzmUKwAZEqgHs4+TTz90dUu5/aIqQ==", - "dev": true, - "bin": { - "tsc": "typescript/bin/tsc", - "tsserver": "typescript/bin/tsserver" + "node": ">=14.16" } }, "node_modules/type-detect": { @@ -1471,9 +1467,9 @@ } }, "node_modules/typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -1668,6 +1664,12 @@ "fastq": "^1.6.0" } }, + "@tsd/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-70j1vy95LsMvciXWJLrQ9pQaaG1inJJ+gZ/dW/bPdzHUH1VTeSl3BBU6QxqFWh5IjPy6s7xHcUw45R71dw4J3w==", + "dev": true + }, "@types/diff": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.2.tgz", @@ -1703,9 +1705,9 @@ "dev": true }, "@types/node": { - "version": "16.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.4.tgz", - "integrity": "sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA==", + "version": "16.18.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.9.tgz", + "integrity": "sha512-nhrqXYxiQ+5B/tPorWum37VgAiefi/wmfJ1QZKGKKecC8/3HqcTTJD0O+VABSPwtseMMF7NCPVT9uGgwn0YqsQ==", "dev": true }, "@types/normalize-package-data": { @@ -2571,25 +2573,17 @@ "dev": true }, "tsd": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.18.0.tgz", - "integrity": "sha512-UIkxm2CLmSjXlQs4zqxgVV9UmzK8VgJ63eBpgkH/ZsMkiUdzxxHvdCCg8F314HDxzfQl2muJEy/TEcXHIFIPXg==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.25.0.tgz", + "integrity": "sha512-liUlvKtsdr+70XEZP/kkF6U8+Q9URZi4Pw58ih7a9x3kjJblG8rdVgvG62xcvkgRva1q3yWX5qAxfYZuYiC5CA==", "dev": true, "requires": { - "@tsd/typescript": "~4.4.3", + "@tsd/typescript": "~4.9.3", "eslint-formatter-pretty": "^4.1.0", "globby": "^11.0.1", "meow": "^9.0.0", "path-exists": "^4.0.0", "read-pkg-up": "^7.0.0" - }, - "dependencies": { - "@tsd/typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-XNaotnbhU6sKSXYg9rVz4L9i9g+j+x1IIgMPztK8KumtMEsrLXcqPBKp/qzmUKwAZEqgHs4+TTz90dUu5/aIqQ==", - "dev": true - } } }, "type-detect": { @@ -2605,9 +2599,9 @@ "dev": true }, "typescript": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", - "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, "typical": { diff --git a/package.json b/package.json index f9219e7..171b86d 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,12 @@ "devDependencies": { "@jsdevtools/npm-publish": "^1.4.3", "@types/diff": "^5.0.2", - "@types/node": "^16.9.4", + "@types/node": "^16.9.6", "@types/prettier": "^2.6.0", "diff": "^5.0.0", "prettier": "^2.6.2", - "tsd": "^0.18.0", - "typescript": "^4.5.2" + "tsd": "^0.25.0", + "typescript": "^4.9.4" }, "scripts": { "build:tsc": "tsc", diff --git a/tests/package-lock.json b/tests/package-lock.json index b25cb41..5b2ffb8 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -26,12 +26,12 @@ "devDependencies": { "@types/node": "^16.9.6", "tsd": "^0.25.0", - "typescript": "^4.6.4" + "typescript": "^4.9.4" } }, "../dist-package/dom": { "name": "@better-typescript-lib/dom", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -39,7 +39,7 @@ }, "../dist-package/es2015": { "name": "@better-typescript-lib/es2015", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -47,7 +47,7 @@ }, "../dist-package/es2016": { "name": "@better-typescript-lib/es2016", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -55,7 +55,7 @@ }, "../dist-package/es2017": { "name": "@better-typescript-lib/es2017", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -63,7 +63,7 @@ }, "../dist-package/es2018": { "name": "@better-typescript-lib/es2018", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -71,7 +71,7 @@ }, "../dist-package/es2019": { "name": "@better-typescript-lib/es2019", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -79,7 +79,7 @@ }, "../dist-package/es2020": { "name": "@better-typescript-lib/es2020", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -87,7 +87,7 @@ }, "../dist-package/es2021": { "name": "@better-typescript-lib/es2021", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -95,7 +95,7 @@ }, "../dist-package/es2022": { "name": "@better-typescript-lib/es2022", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -103,7 +103,7 @@ }, "../dist-package/es5": { "name": "@better-typescript-lib/es5", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -111,7 +111,7 @@ }, "../dist-package/esnext": { "name": "@better-typescript-lib/esnext", - "version": "2.1.0", + "version": "2.2.0", "integrity": "sha1-1aczY1lVFLRpoWBIvz39vBC4NWs=", "license": "Apache-2.0", "peerDependencies": { @@ -120,7 +120,7 @@ }, "../dist-package/header": { "name": "@better-typescript-lib/header", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -128,7 +128,7 @@ }, "../dist-package/scripthost": { "name": "@better-typescript-lib/scripthost", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -136,7 +136,7 @@ }, "../dist-package/webworker": { "name": "@better-typescript-lib/webworker", - "version": "2.1.0", + "version": "2.2.0", "license": "Apache-2.0", "peerDependencies": { "typescript": ">=4.5.2" @@ -1455,9 +1455,9 @@ } }, "node_modules/typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -2476,9 +2476,9 @@ "dev": true }, "typescript": { - "version": "4.6.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz", - "integrity": "sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", "dev": true }, "validate-npm-package-license": { diff --git a/tests/package.json b/tests/package.json index d7106b9..f410871 100644 --- a/tests/package.json +++ b/tests/package.json @@ -15,7 +15,7 @@ "devDependencies": { "@types/node": "^16.9.6", "tsd": "^0.25.0", - "typescript": "^4.6.4" + "typescript": "^4.9.4" }, "dependencies": { "@typescript/lib-dom": "file:../dist-package/dom", diff --git a/tests/src/es2017.object.ts b/tests/src/es2017.object.ts index 588ca29..6e24974 100644 --- a/tests/src/es2017.object.ts +++ b/tests/src/es2017.object.ts @@ -42,7 +42,7 @@ function createGenericRecord( expectType<(number | { [k: string]: number })[]>(values5); expectType<[string, number | { [k: string]: number }][]>(entries5); } -function test(obj: CheckNonNullable) { +function test(obj: Record) { const values = Object.values(obj); expectType(values[0]);