Skip to content

Transform

1 exports Added in v4.0.0 Source

Testing

transform

Added in v4.0.0 Source

Transforms trailing doctest assertion comments into executable assertions.

Details

An assertion may trail an expression statement or a single initialized const identifier. Expected values are TypeScript expressions evaluated in the same lexical scope.

Signature

declare function transform(source: string, file: string, line: number): string;