diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a88faf..eb4c24e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +#### Fixed +- Some abstract methods were not implemented from interfaces +- Optional parameters are implemented now ([#141](https://github.com/buehler/typescript-hero/issues/141)) + #### Removed - The document view, since there is a command `cmd+shift+o` that basically does the same, but better diff --git a/src/common/ts-parsing/declarations/MethodDeclaration.ts b/src/common/ts-parsing/declarations/MethodDeclaration.ts index 341772f..c87e96e 100644 --- a/src/common/ts-parsing/declarations/MethodDeclaration.ts +++ b/src/common/ts-parsing/declarations/MethodDeclaration.ts @@ -18,7 +18,7 @@ import { CompletionItemKind } from 'vscode-languageserver-types'; */ @Serializable({ factory: (json) => { - const obj = new MethodDeclaration(json.name, json.isExported, json.visibility, json.type, json.start, json.end); + const obj = new MethodDeclaration(json.name, json.isAbstract, json.visibility, json.type, json.start, json.end); obj.parameters = json.parameters; obj.variables = json.variables; return obj; diff --git a/test/_workspace/extension/extensions/codeActionExtension/implementInterfaceOrAbstract.ts b/test/_workspace/extension/extensions/codeActionExtension/implementInterfaceOrAbstract.ts index a40e725..33bf0f8 100644 --- a/test/_workspace/extension/extensions/codeActionExtension/implementInterfaceOrAbstract.ts +++ b/test/_workspace/extension/extensions/codeActionExtension/implementInterfaceOrAbstract.ts @@ -29,7 +29,7 @@ interface GenericInterface { abstract class GenericAbstractClass { public abstract abstractMethod(p1: T1): T2; - protected abstract protMethod(p2: T2, p3: T3); + protected abstract protMethod(p2: T2, p3?: T3); } class ImplementGenericInterface implements GenericInterface {