Skip to content
This repository has been archived by the owner on Oct 10, 2018. It is now read-only.

Commit

Permalink
fix(code action): implement interface or abstract adds optionals (#233)
Browse files Browse the repository at this point in the history
* remove the need of abstract in implement

* fix bug in serializing of objects

* changelog

* add the abstract check again

* add an optional param
  • Loading branch information
buehler committed Jul 7, 2017
1 parent 68efb9a commit aa8f557
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/common/ts-parsing/declarations/MethodDeclaration.ts
Expand Up @@ -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;
Expand Down
Expand Up @@ -29,7 +29,7 @@ interface GenericInterface<T1, T2> {

abstract class GenericAbstractClass<T1, T2, T3> {
public abstract abstractMethod(p1: T1): T2;
protected abstract protMethod(p2: T2, p3: T3);
protected abstract protMethod(p2: T2, p3?: T3);
}

class ImplementGenericInterface implements GenericInterface<string, number> {
Expand Down

0 comments on commit aa8f557

Please sign in to comment.