Restore @babel/types support for old TS versions (#12521)

This commit is contained in:
Nicolò Ribaudo
2020-12-17 18:34:23 +01:00
committed by GitHub
parent bfb51362c7
commit b9deeb458b
3 changed files with 9 additions and 7 deletions

View File

@@ -14,10 +14,11 @@
"directory": "packages/babel-types"
},
"main": "lib/index.js",
"types": "lib/index-legacy.d.ts",
"typesVersions": {
"<3.7": {
"lib/index.d.ts": [
"lib/index-ts3.7.d.ts"
">=3.7": {
"lib/index-legacy.d.ts": [
"lib/index.d.ts"
]
}
},

View File

@@ -5,7 +5,7 @@ const stringifyValidator = require("../utils/stringifyValidator");
const toFunctionName = require("../utils/toFunctionName");
let code = `// NOTE: This file is autogenerated. Do not modify.
// See packages/babel-types/scripts/generators/typescript-3.7.js for script used.
// See packages/babel-types/scripts/generators/typescript-legacy.js for script used.
interface BaseComment {
value: string;