Skip to content

Commit

Permalink
chore: Extract codegen ParserError from flow and typescript into a co…
Browse files Browse the repository at this point in the history
…mmon file
  • Loading branch information
gabrieldonadel committed Oct 5, 2022
1 parent 0857238 commit 261a7bc
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'use strict';

const invariant = require('invariant');
const {ParserError} = require('../errors');
const {ParserError} = require('../../errors');

class MisnamedModuleFlowInterfaceParserError extends ParserError {
constructor(hasteModuleName: string, id: $FlowFixMe) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen/src/parsers/flow/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

'use strict';

const {ParserError} = require('./errors');
const {ParserError} = require('../errors');

/**
* This FlowFixMe is supposed to refer to an InterfaceDeclaration or TypeAlias
Expand Down
36 changes: 0 additions & 36 deletions packages/react-native-codegen/src/parsers/typescript/errors.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'use strict';

const invariant = require('invariant');
const {ParserError} = require('../errors');
const {ParserError} = require('../../errors');

class MisnamedModuleTypeScriptInterfaceParserError extends ParserError {
constructor(hasteModuleName: string, id: $FlowFixMe) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

'use strict';

const {ParserError} = require('./errors');
const {ParserError} = require('../errors');

/**
* TODO(T108222691): Use flow-types for @babel/parser
Expand Down

0 comments on commit 261a7bc

Please sign in to comment.