Usage of "@babel/plugin-proposal-decorators" with legacy
support causes "abstract" keyword to be preserved.
This fixes it by moving "abstract" node property removal
from "ClassDeclaration" visitor to "Class". Resolves#8172
When traversing a tree parsing for TypeScript syntax and hitting a `TSFunctionType` node, the `typeParameters` and `typeAnnotation` fields are correctly visited but the `parameters` field isn't. As a result visitors by default don't visit `foo` below:
```
var x: (foo) => void; // foo is never visited
```
```
module.exports = function() {
return {
visitor: {
Identifier(path) {
if (path.node.name == "foo") {
// Never hit because it's nested within TSFunctionType.parameters
path.node.name = "bar";
}
}
}
};
}
```
It appears to be a bug in babel-types/src/definitions/typescript.js which omits `parameters` in the visitors list for `fnOrCtr`. Fixed by adding it.
* add partial application syntax and some tests
remove unnecessary error message and hasPartial function from parseNewArguments
add types for PartialExpression
Update the tests
rename PartialExpression to Partial
move Partial from expressions to types and rename to ArgumentPlaceholder
add tests for ArgumentPlaceholder in babel-generator
rename Partial to ArgumentPlaceholder
update the tests
remove alias from the type and undo changes in generated folder
adds a nice error message
better definition for the type
auto-generated files
update the conditional for allowPlaceholder message and tests
update CallExpression definition to accept ArgumentPlaceholder
change description
clean up
indent ArgumentPlaceholder entry and revert unwanted changes
* add Partial Application Plugin
* update unwrapArguments function and add replacePlaceholders.
* update the tests
* remove unnecessary clone
* update readme and description an package.json
* put options.json one level up and add test for not assigned and chained
* add await to fix the test
* use Promise in the test instead of async await
* remove unnecessary method test [#9474]
* push sequenceExpressions to an array [#9474]
* Add parser createParenthesizedExpressions option …
When set to `true` we create `ParenthesizedExpression` nodes instead of
setting `extra.parenthesized`.
* Also update babel-parser.d.ts
* Disallow escape sequences in async
* Disallow escape sequences in get, set and async in class
* invalid escape tests
* Update whitelist
* tests for async in parens
* Add test for invalid newline between params and arrow
* Move canInsertSemilcolon() into shouldPArseAsyncArrow
* add partial application syntax and some tests
* remove unnecessary error message and hasPartial function from parseNewArguments
* add types for PartialExpression
* Update the tests
* rename PartialExpression to Partial
* move Partial from expressions to types and rename to ArgumentPlaceholder
* add tests for ArgumentPlaceholder in babel-generator
* rename Partial to ArgumentPlaceholder
* update the tests
* remove alias from the type and undo changes in generated folder
* adds a nice error message
* better definition for the type
* auto-generated files
* update the conditional for allowPlaceholder message and tests
* update CallExpression definition to accept ArgumentPlaceholder
* change description
* clean up
* indent ArgumentPlaceholder entry and revert unwanted changes
* fix: strip type imports used in Enums and object types
* chore: update failing snapshot
* docs: correct TSPropertySignature comment
* fix: enum value should be considered a reference
* chore: add tests for TSPropertySignature and TSEnumMember
* Refactor parsing object members
* Ensure decorators on rest don’t swallow decorators silently
* Use hasPrecedingLineBreak
* Add test for async with linebreak
* Update flow whitelist
* preset-env: minimally supporting version
This changes the "does browser support X" algorithm to "lowest version such that all higher versions support it".
Eg, given `{ chrome70: true, chrome60: false, chrome50: true }`, the lowest version is chrome70, not chrome50.
This is done to remove Tagged Template Literal support from Safari, which introduced a bug in Safari 12 but correctly implemented the feature in Safari 11-9.
* Add tests
* Fix tests
* Fix comment
Likely because of implicit `equals` (ie, Safari 12 support implies iOS Safari 12), the versions in the `res` hash are not always sorted in version order.
Doing a semver sort reveals some builtins have actually been supported a little longer than we thought!