Migrate Babel from Flow to TypeScript (except Babel parser) (#11578)
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
This commit is contained in:
@@ -19,6 +19,13 @@ export default declare(api => {
|
||||
optional = false,
|
||||
comments = generateComment(ofPath, optional),
|
||||
keepType = false,
|
||||
}: {
|
||||
ofPath?;
|
||||
toPath?;
|
||||
where?: string;
|
||||
optional?;
|
||||
comments?;
|
||||
keepType?;
|
||||
}) {
|
||||
if (!toPath?.node) {
|
||||
toPath = ofPath.getPrevSibling();
|
||||
@@ -67,7 +74,7 @@ export default declare(api => {
|
||||
});
|
||||
}
|
||||
|
||||
function generateComment(path, optional) {
|
||||
function generateComment(path, optional?) {
|
||||
let comment = path
|
||||
.getSource()
|
||||
.replace(/\*-\//g, "*-ESCAPED/")
|
||||
Reference in New Issue
Block a user