fix(28516): Abstract methods should not allow async modifier#39963
Merged
sandersn merged 1 commit intomicrosoft:masterfrom Sep 4, 2020
Merged
fix(28516): Abstract methods should not allow async modifier#39963sandersn merged 1 commit intomicrosoft:masterfrom
async modifier#39963sandersn merged 1 commit intomicrosoft:masterfrom
Conversation
sandersn
approved these changes
Sep 4, 2020
Member
sandersn
left a comment
There was a problem hiding this comment.
Looks good to me.
This is a breaking change, so I'm marking it as such. However, I couldn't find any examples of its use on my hard drive, which has a lot of TS and JS on it. =)
|
And now??? How should we implement a concrete async function in an abstract class??? This seems not be possible anymore: export abstract class Base {
public abstract getName(): string;
public async getAge(): Promise<number> {
return await fetchAgeFromServer()
}
}
class Real extends Base {
getName(): string {
return 'MyName';
}
} |
josephaxisa
added a commit
to looker-open-source/sdk-codegen
that referenced
this pull request
Dec 21, 2020
This was a breaking change as of TS 4.x: microsoft/TypeScript#39963 More context: microsoft/TypeScript#25710 (comment)
jkaster
pushed a commit
to looker-open-source/sdk-codegen
that referenced
this pull request
Dec 21, 2020
* Bumped TypeScript version to 4.1.3 * Removed async modifier from abstract method This was a breaking change as of TS 4.x: microsoft/TypeScript#39963 More context: microsoft/TypeScript#25710 (comment) * Removed ts-node from non-root package.json files * Added test:sdk script to root package.json * Fixed specConverter paths * Fixed logical error in declarationMiner.spec.ts * yarn.lock * Fix root path resolution for sdk-rtl testUtils.ts Co-authored-by: John Kaster <kaster@google.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28516