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

Add changes from fork #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add changes from fork #21

wants to merge 1 commit into from

Conversation

sokra
Copy link

@sokra sokra commented Feb 5, 2019

Hey @MartinJohns I liked your extension, used it a bit (mainly for .js files with jsdoc annotations) and added some improvements on a fork.

This PR contributes all my changes back to your repo.

Here is a summary of all changes. If you dislike some change, give me a hint and I'll remove it from the PR. Sadly it's a single commit as I didn't watch out for good commits while playing around.

Bugfixes

  • also watch .tsx files
  • unnest decorationsStyle in package.json, because defaults doesn't work in nested way
  • handle errors while adding types
  • handle errors while updating the source code
  • add two decorations to avoid weird cursor positions
  • do not include CHANGELOG.md and build .vsix files in publish

Features

  • add .js and .jsx as supported files
  • also watch .js and .jsx files
  • change arrowFunctionVariable to functionVariableType and make it work for normal functions too
  • add objectPatternType, which adds types to object patterns
  • add arrayPatternType, which adds types to array patterns
  • add objectLiteralType, which adds types to object literals
  • split decorationStyle into lightThemeDecorationStyle and darkThemeDecorationStyle
  • allow to omit types on higher AST levels when types are already added on deeper level
  • avoid adding types to functions returning functions, as the nested function already has types
  • cache type names, as these can be expensive
  • add a hoverMessage with the long type info
  • also highlight variations for any (like any[] or Something<any>)

Development

  • make clean script windows compatible
  • remove verbose log info

# Bugfixes

* also watch .tsx files
* unnest decorationsStyle in package.json, because defaults doesn't work in nested way
* handle errors while adding types
* handle errors while updating the source code
* add two decorations to avoid weird cursor positions
* do not include CHANGELOG.md and build .vsix files in publish

# Features

* add .js and .jsx as supported files
* also watch .js and .jsx files
* change arrowFunctionVariable to functionVariableType and make it work for normal functions too
* add objectPatternType, which adds types to object patterns
* add arrayPatternType, which adds types to array patterns
* add objectLiteralType, which adds types to object literals
* split decorationStyle into lightThemeDecorationStyle and darkThemeDecorationStyle
* allow to omit types on higher AST levels when types are already added on deeper level
* avoid adding types to functions returning functions, as the nested function already has types
* cache type names, as these can be expensive
* add a hoverMessage with the long type info
* also highlight variations for `any` (like `any[]` or `Something<any>`)

# Development

* make clean script windows compatible
* remove verbose log info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant