Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jul 8, 2022
1 parent e1c4980 commit 1f695dd
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
@@ -0,0 +1 @@
#{ a: 1 }
@@ -0,0 +1,3 @@
{
"plugins": ["recordAndTuple"]
}
@@ -0,0 +1,3 @@
#{
a: 1
};
@@ -0,0 +1 @@
#{ a: 1 }
@@ -0,0 +1,3 @@
{
"plugins": ["recordAndTuple"]
}
@@ -0,0 +1,44 @@
{
"type": "File",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}},
"program": {
"type": "Program",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}},
"expression": {
"type": "RecordExpression",
"start":0,"end":9,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":9,"index":9}},
"properties": [
{
"type": "ObjectProperty",
"start":3,"end":7,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":7,"index":7}},
"method": false,
"key": {
"type": "Identifier",
"start":3,"end":4,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":1,"column":4,"index":4},"identifierName":"a"},
"name": "a"
},
"computed": false,
"shorthand": false,
"value": {
"type": "NumericLiteral",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7}},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
}
}
]
}
}
],
"directives": []
}
}
3 changes: 2 additions & 1 deletion packages/babel-parser/typings/babel-parser.d.ts
Expand Up @@ -162,6 +162,7 @@ export type ParserPlugin =
| "pipelineOperator"
| "placeholders"
| "privateIn" // Enabled by default
| "recordAndTuple"
| "regexpUnicodeSets"
| "throwExpressions"
| "topLevelAwait"
Expand All @@ -186,7 +187,7 @@ export interface PipelineOperatorPluginOptions {
}

export interface RecordAndTuplePluginOptions {
syntaxType: "bar" | "hash";
syntaxType?: "bar" | "hash";
}

export interface FlowPluginOptions {
Expand Down

0 comments on commit 1f695dd

Please sign in to comment.