Skip to content

Commit

Permalink
refactor[ReactDebugHooks]: make stack trace parser sourcemap independent
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxyq committed Oct 30, 2023
1 parent 0c63487 commit 2a401da
Show file tree
Hide file tree
Showing 8 changed files with 274 additions and 167 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
packages/react-devtools-shell/dist
packages/react-devtools-timeline/dist
packages/react-devtools-timeline/static

flow-typed
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
build

flow-typed

packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/firefox/build
Expand Down
60 changes: 60 additions & 0 deletions flow-typed/npm/error-stack-parser_v2.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// flow-typed signature: 132e48034ef4756600e1d98681a166b5
// flow-typed version: c6154227d1/error-stack-parser_v2.x.x/flow_>=v0.104.x

declare module "error-stack-parser" {
declare interface StackFrame {
constructor(object: StackFrame): StackFrame;

isConstructor?: boolean;
getIsConstructor(): boolean;
setIsConstructor(): void;

isEval?: boolean;
getIsEval(): boolean;
setIsEval(): void;

isNative?: boolean;
getIsNative(): boolean;
setIsNative(): void;

isTopLevel?: boolean;
getIsTopLevel(): boolean;
setIsTopLevel(): void;

columnNumber?: number;
getColumnNumber(): number;
setColumnNumber(): void;

lineNumber?: number;
getLineNumber(): number;
setLineNumber(): void;

fileName?: string;
getFileName(): string;
setFileName(): void;

functionName?: string;
getFunctionName(): string;
setFunctionName(): void;

source?: string;
getSource(): string;
setSource(): void;

args?: any[];
getArgs(): any[];
setArgs(): void;

evalOrigin?: StackFrame;
getEvalOrigin(): StackFrame;
setEvalOrigin(): void;

toString(): string;
}

declare class ErrorStackParser {
parse(error: Error): Array<StackFrame>;
}

declare module.exports: ErrorStackParser;
}
Loading

0 comments on commit 2a401da

Please sign in to comment.