mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(43939): forbid converting getters to async/await (#43944)
This commit is contained in:
@@ -1698,6 +1698,14 @@ function [#|f|](x?: number): Promise<void> | number {
|
||||
if (x) return x;
|
||||
return fetch('').then(() => {});
|
||||
}
|
||||
`);
|
||||
|
||||
_testConvertToAsyncFunctionFailed("convertToAsyncFunction__NoSuggestionInGetters", `
|
||||
class Foo {
|
||||
get [#|m|](): Promise<number> {
|
||||
return Promise.resolve(1).then(n => n);
|
||||
}
|
||||
}
|
||||
`);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user