Skip to content

Commit ffef1c5

Browse files
gabrieldonadelcipolleschi
authored andcommitted
chore: Extract codegen ParserError from flow and typescript into a common file
1 parent ae3dd54 commit ffef1c5

File tree

6 files changed

+4
-40
lines changed

6 files changed

+4
-40
lines changed

packages/react-native-codegen/src/parsers/flow/modules/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
const invariant = require('invariant');
14-
const {ParserError} = require('../errors');
14+
const {ParserError} = require('../../errors');
1515

1616
class MisnamedModuleFlowInterfaceParserError extends ParserError {
1717
constructor(hasteModuleName: string, id: $FlowFixMe) {

packages/react-native-codegen/src/parsers/flow/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
const {ParserError} = require('./errors');
13+
const {ParserError} = require('../errors');
1414

1515
/**
1616
* This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias

packages/react-native-codegen/src/parsers/typescript/errors.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

packages/react-native-codegen/src/parsers/typescript/modules/errors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
const invariant = require('invariant');
14-
const {ParserError} = require('../errors');
14+
const {ParserError} = require('../../errors');
1515

1616
class MisnamedModuleTypeScriptInterfaceParserError extends ParserError {
1717
constructor(hasteModuleName: string, id: $FlowFixMe) {

packages/react-native-codegen/src/parsers/typescript/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
const {ParserError} = require('./errors');
13+
const {ParserError} = require('../errors');
1414
const {parseTopLevelType} = require('./parseTopLevelType');
1515

1616
/**

0 commit comments

Comments
 (0)