twoslash
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -1,3 +0,3 @@ | ||
import { C as CreateTwoSlashOptions, c as TwoSlashInstance, b as TwoSlashOptions, a as TwoSlashReturn } from './shared/twoslash.33bd3d4a.js'; | ||
export { H as HandbookOptions, k as NodeBase, o as NodeCompletion, p as NodeError, u as NodeErrorWithoutPosition, m as NodeHighlight, l as NodeHover, n as NodeQuery, N as NodeStartLength, q as NodeTag, t as NodeWithoutPosition, y as ParsedFlagNotation, P as Position, R as Range, w as TS, T as TwoSlashExecuteOptions, j as TwoSlashFunction, s as TwoSlashNode, x as TwoSlashReturnMeta, i as TwoslashError, V as VirtualFile, d as createPositionConverter, z as defaultCompilerOptions, A as defaultHandbookOptions, f as findCutNotations, e as findFlagNotations, g as findQueryMarkers, r as removeCodeRanges, h as resolveNodePositions, v as validateCodeForErrors } from './shared/twoslash.33bd3d4a.js'; | ||
import { C as CreateTwoslashOptions, c as TwoslashInstance, b as TwoslashOptions, a as TwoslashReturn } from './shared/twoslash.887ffee1.js'; | ||
export { H as HandbookOptions, k as NodeBase, o as NodeCompletion, p as NodeError, u as NodeErrorWithoutPosition, m as NodeHighlight, l as NodeHover, n as NodeQuery, N as NodeStartLength, q as NodeTag, t as NodeWithoutPosition, y as ParsedFlagNotation, P as Position, R as Range, w as TS, i as TwoslashError, T as TwoslashExecuteOptions, j as TwoslashFunction, s as TwoslashNode, x as TwoslashReturnMeta, V as VirtualFile, d as createPositionConverter, z as defaultCompilerOptions, A as defaultHandbookOptions, f as findCutNotations, e as findFlagNotations, g as findQueryMarkers, r as removeCodeRanges, h as resolveNodePositions, v as validateCodeForErrors } from './shared/twoslash.887ffee1.js'; | ||
import '@typescript/vfs'; | ||
@@ -7,12 +7,12 @@ import 'typescript'; | ||
/** | ||
* Create a TwoSlash instance with cached TS environments | ||
* Create a Twoslash instance with cached TS environments | ||
*/ | ||
declare function createTwoSlasher(createOptions?: CreateTwoSlashOptions): TwoSlashInstance; | ||
declare function createTwoslasher(createOptions?: CreateTwoslashOptions): TwoslashInstance; | ||
/** | ||
* Run TwoSlash on a string of code | ||
* Run Twoslash on a string of code | ||
* | ||
* It's recommended to use `createTwoSlash` for better performance on multiple runs | ||
* It's recommended to use `createTwoslash` for better performance on multiple runs | ||
*/ | ||
declare function twoslasher(code: string, lang?: string, opts?: Partial<TwoSlashOptions>): TwoSlashReturn; | ||
declare function twoslasher(code: string, lang?: string, opts?: Partial<TwoslashOptions>): TwoslashReturn; | ||
export { CreateTwoSlashOptions, TwoSlashInstance, TwoSlashOptions, TwoSlashReturn, createTwoSlasher, twoslasher }; | ||
export { CreateTwoslashOptions, TwoslashInstance, TwoslashOptions, TwoslashReturn, createTwoslasher, twoslasher }; |
@@ -1,3 +0,3 @@ | ||
import { T as TwoSlashExecuteOptions, H as HandbookOptions, a as TwoSlashReturn, b as TwoSlashOptions, c as TwoSlashInstance } from './shared/twoslash.33bd3d4a.js'; | ||
export { C as CreateTwoSlashOptions, k as NodeBase, o as NodeCompletion, p as NodeError, u as NodeErrorWithoutPosition, m as NodeHighlight, l as NodeHover, n as NodeQuery, N as NodeStartLength, q as NodeTag, t as NodeWithoutPosition, y as ParsedFlagNotation, P as Position, R as Range, w as TS, j as TwoSlashFunction, s as TwoSlashNode, x as TwoSlashReturnMeta, i as TwoslashError, V as VirtualFile, d as createPositionConverter, z as defaultCompilerOptions, A as defaultHandbookOptions, f as findCutNotations, e as findFlagNotations, g as findQueryMarkers, r as removeCodeRanges, h as resolveNodePositions, v as validateCodeForErrors } from './shared/twoslash.33bd3d4a.js'; | ||
import { T as TwoslashExecuteOptions, H as HandbookOptions, a as TwoslashReturn, b as TwoslashOptions, c as TwoslashInstance } from './shared/twoslash.887ffee1.js'; | ||
export { C as CreateTwoslashOptions, k as NodeBase, o as NodeCompletion, p as NodeError, u as NodeErrorWithoutPosition, m as NodeHighlight, l as NodeHover, n as NodeQuery, N as NodeStartLength, q as NodeTag, t as NodeWithoutPosition, y as ParsedFlagNotation, P as Position, R as Range, w as TS, i as TwoslashError, j as TwoslashFunction, s as TwoslashNode, x as TwoslashReturnMeta, V as VirtualFile, d as createPositionConverter, z as defaultCompilerOptions, A as defaultHandbookOptions, f as findCutNotations, e as findFlagNotations, g as findQueryMarkers, r as removeCodeRanges, h as resolveNodePositions, v as validateCodeForErrors } from './shared/twoslash.887ffee1.js'; | ||
import * as typescript from 'typescript'; | ||
@@ -7,3 +7,3 @@ import { CompilerOptions } from 'typescript'; | ||
interface TwoSlashOptionsLegacy extends TwoSlashExecuteOptions { | ||
interface TwoslashOptionsLegacy extends TwoslashExecuteOptions { | ||
/** | ||
@@ -18,3 +18,3 @@ * @deprecated, use `handbookOptions` instead | ||
} | ||
interface TwoSlashReturnLegacy { | ||
interface TwoslashReturnLegacy { | ||
/** The output code, could be TypeScript, but could also be a JS/JSON/d.ts */ | ||
@@ -97,16 +97,16 @@ code: string; | ||
} | ||
declare function convertLegacyOptions<T extends TwoSlashOptionsLegacy>(opts: T): Omit<T, 'defaultOptions' | 'defaultCompilerOptions'>; | ||
declare function convertLegacyOptions<T extends TwoslashOptionsLegacy>(opts: T): Omit<T, 'defaultOptions' | 'defaultCompilerOptions'>; | ||
/** | ||
* Covert the new return type to the old one | ||
*/ | ||
declare function convertLegacyReturn(result: TwoSlashReturn): TwoSlashReturnLegacy; | ||
declare function convertLegacyReturn(result: TwoslashReturn): TwoslashReturnLegacy; | ||
/** | ||
* Create a TwoSlash instance with cached TS environments | ||
* Create a Twoslash instance with cached TS environments | ||
*/ | ||
declare function createTwoSlasher(opts?: TwoSlashOptions): TwoSlashInstance; | ||
declare function createTwoslasher(opts?: TwoslashOptions): TwoslashInstance; | ||
/** | ||
* Get type results from a code sample | ||
*/ | ||
declare function twoslasher(code: string, lang: string, opts?: TwoSlashOptions): TwoSlashReturn; | ||
declare function twoslasher(code: string, lang: string, opts?: TwoslashOptions): TwoslashReturn; | ||
/** | ||
@@ -117,4 +117,4 @@ * Compatability wrapper to align with `@typescript/twoslash`'s input/output | ||
*/ | ||
declare function twoslasherLegacy(code: string, lang: string, opts?: TwoSlashOptionsLegacy): TwoSlashReturnLegacy; | ||
declare function twoslasherLegacy(code: string, lang: string, opts?: TwoslashOptionsLegacy): TwoslashReturnLegacy; | ||
export { HandbookOptions, TwoSlashExecuteOptions, TwoSlashInstance, TwoSlashOptions, type TwoSlashOptionsLegacy, TwoSlashReturn, type TwoSlashReturnLegacy, convertLegacyOptions, convertLegacyReturn, createTwoSlasher, twoslasher, twoslasherLegacy }; | ||
export { HandbookOptions, TwoslashExecuteOptions, TwoslashInstance, TwoslashOptions, type TwoslashOptionsLegacy, TwoslashReturn, type TwoslashReturnLegacy, convertLegacyOptions, convertLegacyReturn, createTwoslasher, twoslasher, twoslasherLegacy }; |
{ | ||
"name": "twoslash", | ||
"type": "module", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Markup for generating rich type information in your documentations ahead of time", | ||
@@ -6,0 +6,0 @@ "author": "TypeScript team", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2815
133058