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

fix: bumped ts-api-utils to 0.0.39 #6497

Merged
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Expand Up @@ -53,7 +53,7 @@
"natural-compare-lite": "^1.4.0",
"regexpp": "^3.2.0",
"semver": "^7.3.7",
"ts-api-utils": "^0.0.22"
"ts-api-utils": "^0.0.28"
},
"devDependencies": {
"@types/debug": "*",
Expand Down
Expand Up @@ -369,7 +369,7 @@ ruleTester.run('prefer-readonly-parameter-types', rule, {
interface Obj {
readonly [K: string]: Obj;
}

function foo(event: Obj): void {}
`,
options: [
Expand All @@ -386,11 +386,11 @@ ruleTester.run('prefer-readonly-parameter-types', rule, {
interface Obj1 {
readonly [K: string]: Obj2;
}

interface Obj2 {
readonly [K: string]: Obj1;
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was done by my editor. 🤷 might as well.

function foo(event: Obj1): void {}
`,
options: [
Expand Down Expand Up @@ -869,5 +869,21 @@ ruleTester.run('prefer-readonly-parameter-types', rule, {
},
],
},
// https://github.com/typescript-eslint/typescript-eslint/issues/3405
{
code: `
type MyType<T> = {
[K in keyof T]: "cat" | "dog" | T[K];
};

function method<A extends any[] = string[]>(value: MyType<A>) {
return value;
}

method(["cat", "dog"]);
method<"mouse"[]>(["cat", "mouse"]);
`,
errors: [{ line: 6, messageId: 'shouldBeReadonly' }],
},
],
});
9 changes: 9 additions & 0 deletions packages/eslint-plugin/tests/rules/require-await.test.ts
Expand Up @@ -218,6 +218,15 @@ async function* foo(): Promise<string> {
return new Promise(res => res(\`hello\`));
}
`,
// https://github.com/typescript-eslint/typescript-eslint/issues/5458
`
async function* f() {
let x!: Omit<{
[Symbol.asyncIterator](): AsyncIterator<any>;
}, 'z'>
yield* x;
}
`,
],

invalid: [
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/package.json
Expand Up @@ -42,7 +42,7 @@
"@typescript-eslint/typescript-estree": "5.52.0",
"@typescript-eslint/utils": "5.52.0",
"debug": "^4.3.4",
"ts-api-utils": "^0.0.22"
"ts-api-utils": "^0.0.28"
},
"devDependencies": {
"@typescript-eslint/parser": "5.52.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-estree/package.json
Expand Up @@ -48,7 +48,7 @@
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"semver": "^7.3.7",
"ts-api-utils": "^0.0.22"
"ts-api-utils": "^0.0.28"
},
"devDependencies": {
"@babel/code-frame": "*",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -13823,10 +13823,10 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406"
integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==

ts-api-utils@^0.0.22:
version "0.0.22"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-0.0.22.tgz#c58aac346f3990e6e164b4907aca57f54d81a2e8"
integrity sha512-XrQNMP/CQk2gOa+NfNIxNSf60n+RsC7tAkyCxhwnkShxUFpitvwNDfDxdMIZxHtdKKqqeRi94T191sNN7pFSrg==
ts-api-utils@^0.0.28:
version "0.0.28"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-0.0.28.tgz#be4e70b40ec8a63482bcb63c30e2646c669d2f23"
integrity sha512-90VNjxKwQmBm3JyfkitDXVzG3WppJYeCDUghzi7w8Q6MK9vYmkScg4Bg1LSC2qXXJz1ToyleQqmXbLhVJW3t5g==

ts-essentials@^2.0.3:
version "2.0.12"
Expand Down