Partial Application Syntax: Stage 1 (#9343)
* 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
This commit is contained in:
committed by
Nicolò Ribaudo
parent
37a427f692
commit
c60c4dd375
@@ -0,0 +1,3 @@
|
||||
src
|
||||
test
|
||||
*.log
|
||||
19
packages/babel-plugin-syntax-partial-application/README.md
Normal file
19
packages/babel-plugin-syntax-partial-application/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# @babel/plugin-syntax-partial-application
|
||||
|
||||
> Allow parsing of optional properties
|
||||
|
||||
See our website [@babel/plugin-syntax-partial-application](https://babeljs.io/docs/en/next/babel-plugin-syntax-partial-application.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-syntax-partial-application
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-syntax-partial-application --dev
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "@babel/plugin-syntax-partial-application",
|
||||
"version": "7.2.0",
|
||||
"description": "Allow parsing of partial application syntax",
|
||||
"repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-partial-application",
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"main": "lib/index.js",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.2.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import { declare } from "@babel/helper-plugin-utils";
|
||||
|
||||
export default declare(api => {
|
||||
api.assertVersion(7);
|
||||
|
||||
return {
|
||||
name: "syntax-partial-application",
|
||||
|
||||
manipulateOptions(opts, parserOpts) {
|
||||
parserOpts.plugins.push("partialApplication");
|
||||
},
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user