Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/buck-worker-tool/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```ts

import type { Duplex } from 'node:stream';
import type {Duplex} from 'node:stream';

export function buckWorker(commands: Commands): Duplex;

Expand Down
40 changes: 20 additions & 20 deletions packages/metro-babel-transformer/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,52 @@

```ts

import type { BabelFileMetadata } from '@babel/core';
import type { File as File_2 } from '@babel/types';
import { transformFromAstSync } from '@babel/core';
import type {BabelFileMetadata} from '@babel/core';
import type {File as File_2} from '@babel/types';
import {transformFromAstSync} from '@babel/core';

export type BabelFileFunctionMapMetadata = Readonly<{
names: ReadonlyArray<string>;
mappings: string;
names: ReadonlyArray<string>;
mappings: string;
}>;

export type BabelFileImportLocsMetadata = ReadonlySet<string>;

export type BabelTransformer = Readonly<{
transform: (transformerArgs: BabelTransformerArgs) => Readonly<{
ast: File_2;
functionMap?: BabelFileFunctionMapMetadata | undefined;
metadata?: MetroBabelFileMetadata | undefined;
}>;
getCacheKey?: ((options?: BabelTransformerCacheKeyOptions) => string) | undefined;
transform: (transformerArgs: BabelTransformerArgs) => Readonly<{
ast: File_2;
functionMap?: BabelFileFunctionMapMetadata | undefined;
metadata?: MetroBabelFileMetadata | undefined;
}>;
getCacheKey?: ((options?: BabelTransformerCacheKeyOptions) => string) | undefined;
}>;

export type BabelTransformerArgs = Readonly<{
filename: string;
options: BabelTransformerOptions;
plugins?: BabelTransformOptions['plugins'] | undefined;
src: string;
filename: string;
options: BabelTransformerOptions;
plugins?: BabelTransformOptions['plugins'] | undefined;
src: string;
}>;

export type BabelTransformerCacheKeyOptions = Readonly<{
projectRoot?: string | undefined;
enableBabelRCLookup?: boolean | undefined;
projectRoot?: string | undefined;
enableBabelRCLookup?: boolean | undefined;
}>;

export type CustomTransformOptions = {
[key: string]: unknown;
[key: string]: unknown;
};

export function getCacheKey(options?: BabelTransformerCacheKeyOptions): string;

export type MetroBabelFileMetadata = Omit<BabelFileMetadata, 'metro'> & {
metro?:
metro?:
| null
| undefined
| {
functionMap?: null | undefined | BabelFileFunctionMapMetadata;
unstable_importDeclarationLocs?: null | undefined | BabelFileImportLocsMetadata;
};
};
};

export function transform(opts: BabelTransformerArgs): ReturnType<BabelTransformer['transform']>;
Expand Down
58 changes: 29 additions & 29 deletions packages/metro-cache/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,57 @@

// @deprecated
export class AutoCleanFileStore<T> extends FileStore<T> {
constructor(opts: CleanOptions);
constructor(opts: CleanOptions);
}

class Cache_2<T> {
constructor(stores: ReadonlyArray<CacheStore<T>>);
get(key: Buffer): Promise<null | undefined | T>;
get isDisabled(): boolean;
set(key: Buffer, value: T): Promise<void>;
constructor(stores: ReadonlyArray<CacheStore<T>>);
get(key: Buffer): Promise<null | undefined | T>;
get isDisabled(): boolean;
set(key: Buffer, value: T): Promise<void>;
}
export { Cache_2 as Cache }
export {Cache_2 as Cache};

export interface CacheStore<T> {
clear(): void | Promise<void>;
get(key: Buffer): (null | undefined | T) | Promise<null | undefined | T>;
name?: string | undefined;
set(key: Buffer, value: T): void | Promise<void>;
clear(): void | Promise<void>;
get(key: Buffer): (null | undefined | T) | Promise<null | undefined | T>;
name?: string | undefined;
set(key: Buffer, value: T): void | Promise<void>;
}

export type FileOptions = Readonly<{root: string}>;

export class FileStore<T> {
constructor(options: FileOptions);
clear(): void;
get(key: Buffer): Promise<null | undefined | T>;
set(key: Buffer, value: T): Promise<void>;
constructor(options: FileOptions);
clear(): void;
get(key: Buffer): Promise<null | undefined | T>;
set(key: Buffer, value: T): Promise<void>;
}

export class HttpGetStore<T> extends HttpStore<T> {
constructor(options: HttpOptions);
get(key: Buffer): Promise<null | undefined | T>;
set(_key: Buffer, _value: T): Promise<void>;
constructor(options: HttpOptions);
get(key: Buffer): Promise<null | undefined | T>;
set(_key: Buffer, _value: T): Promise<void>;
}

export type HttpOptions = EndpointOptions | {getOptions: EndpointOptions; setOptions: EndpointOptions};

export class HttpStore<T> {
constructor(options: HttpOptions);
clear(): void;
get(key: Buffer): Promise<null | undefined | T>;
static HttpError: typeof HttpError;
static NetworkError: typeof NetworkError;
set(key: Buffer, value: T): Promise<void>;
constructor(options: HttpOptions);
clear(): void;
get(key: Buffer): Promise<null | undefined | T>;
static HttpError: typeof HttpError;
static NetworkError: typeof NetworkError;
set(key: Buffer, value: T): Promise<void>;
}

export interface MetroCache {
readonly AutoCleanFileStore: typeof AutoCleanFileStore;
readonly Cache: typeof Cache_2;
readonly FileStore: typeof FileStore;
readonly HttpGetStore: typeof HttpGetStore;
readonly HttpStore: typeof HttpStore;
readonly stableHash: typeof stableHash;
readonly AutoCleanFileStore: typeof AutoCleanFileStore;
readonly Cache: typeof Cache_2;
readonly FileStore: typeof FileStore;
readonly HttpGetStore: typeof HttpGetStore;
readonly HttpStore: typeof HttpStore;
readonly stableHash: typeof stableHash;
}

export function stableHash(value: unknown): Buffer;
Expand Down
Loading
Loading