mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 18:41:15 +08:00
DISABLE_THIRD_PARTY_CHECK=Add node_modules R=jacktfranklin@chromium.org,aerotwist@chromium.org Bug: 1084578 Change-Id: I70e03fa74f53960a17c884a2bac4027382d66525 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2208135 Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { Node } from 'estree-walker';
|
|
|
|
export interface AttachedScope {
|
|
parent?: AttachedScope;
|
|
isBlockScope: boolean;
|
|
declarations: { [key: string]: boolean };
|
|
addDeclaration(node: Node, isBlockDeclaration: boolean, isVar: boolean): void;
|
|
contains(name: string): boolean;
|
|
}
|
|
|
|
export interface DataToEsmOptions {
|
|
compact?: boolean;
|
|
indent?: string;
|
|
namedExports?: boolean;
|
|
objectShorthand?: boolean;
|
|
preferConst?: boolean;
|
|
}
|
|
|
|
export type AddExtension = (filename: string, ext?: string) => string;
|
|
export const addExtension: AddExtension;
|
|
|
|
export type AttachScopes = (ast: Node, propertyName?: string) => AttachedScope;
|
|
export const attachScopes: AttachScopes;
|
|
|
|
export type CreateFilter = (
|
|
include?: Array<string | RegExp> | string | RegExp | null,
|
|
exclude?: Array<string | RegExp> | string | RegExp | null,
|
|
options?: { resolve?: string | false | null }
|
|
) => (id: string | any) => boolean;
|
|
export const createFilter: CreateFilter;
|
|
|
|
export type MakeLegalIdentifier = (str: string) => string;
|
|
export const makeLegalIdentifier: MakeLegalIdentifier;
|
|
|
|
export type DataToEsm = (data: any, options?: DataToEsmOptions) => string;
|
|
export const dataToEsm: DataToEsm;
|
|
|
|
export type ExtractAssignedNames = (param: Node) => Array<string>;
|
|
export const extractAssignedNames: ExtractAssignedNames;
|