Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate more type tests to TSTyche #1991

Merged
merged 11 commits into from Apr 15, 2024
3 changes: 3 additions & 0 deletions .prettierignore
Expand Up @@ -12,3 +12,6 @@ type-definitions/flow-tests/
!type-definitions/ts-tests/from-js.ts
!type-definitions/ts-tests/functional.ts
!type-definitions/ts-tests/groupBy.ts
!type-definitions/ts-tests/list.ts
!type-definitions/ts-tests/map.ts
!type-definitions/ts-tests/ordered-map.ts
5 changes: 4 additions & 1 deletion tstyche.config.json
Expand Up @@ -8,6 +8,9 @@
"**/type-definitions/ts-tests/exports.ts",
"**/type-definitions/ts-tests/from-js.ts",
"**/type-definitions/ts-tests/functional.ts",
"**/type-definitions/ts-tests/groupBy.ts"
"**/type-definitions/ts-tests/groupBy.ts",
"**/type-definitions/ts-tests/list.ts",
"**/type-definitions/ts-tests/map.ts",
"**/type-definitions/ts-tests/ordered-map.ts"
]
}
4 changes: 3 additions & 1 deletion type-definitions/immutable.d.ts
Expand Up @@ -855,7 +855,9 @@ declare namespace Immutable {
get<K extends keyof R>(key: K, notSetValue?: unknown): R[K];
get<NSV>(key: any, notSetValue: NSV): NSV;

// https://github.com/microsoft/TypeScript/pull/39094
// TODO `<const P extends ...>` can be used after dropping support for TypeScript 4.x
// reference: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#const-type-parameters
// after this change, `as const` assertions can be remove from the type tests
getIn<P extends ReadonlyArray<string | number | symbol>>(
searchKeyPath: [...P],
notSetValue?: unknown
Expand Down