mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix up public API
This commit is contained in:
@@ -274,8 +274,6 @@ namespace ts {
|
||||
updateEnumMember,
|
||||
updateSourceFile: updateSourceFileNode,
|
||||
createNotEmittedStatement,
|
||||
createEndOfDeclarationMarker,
|
||||
createMergeDeclarationMarker,
|
||||
createPartiallyEmittedExpression,
|
||||
updatePartiallyEmittedExpression,
|
||||
createCommaList,
|
||||
@@ -778,8 +776,6 @@ namespace ts {
|
||||
"createEnumMember",
|
||||
"updateEnumMember",
|
||||
"createNotEmittedStatement",
|
||||
"createEndOfDeclarationMarker",
|
||||
"createMergeDeclarationMarker",
|
||||
"createPartiallyEmittedExpression",
|
||||
"updatePartiallyEmittedExpression",
|
||||
"createCommaList",
|
||||
|
||||
@@ -5306,6 +5306,7 @@ namespace ts {
|
||||
/**
|
||||
* Gets the transform flags to exclude when unioning the transform flags of a subtree.
|
||||
*/
|
||||
/* @internal */
|
||||
export function getTransformFlagsSubtreeExclusions(kind: SyntaxKind) {
|
||||
if (kind >= SyntaxKind.FirstTypeNode && kind <= SyntaxKind.LastTypeNode) {
|
||||
return TransformFlags.TypeExcludes;
|
||||
|
||||
+6
-11
@@ -5198,6 +5198,8 @@ namespace ts {
|
||||
deactivate(): Promise<CompilerPluginDeactivationResult>;
|
||||
}
|
||||
|
||||
export type CompilerPluginHookResult<T> = PromiseLike<T> | T;
|
||||
|
||||
/**
|
||||
* Describes the supported shape of the main module for a compiler plugin.
|
||||
*/
|
||||
@@ -5205,19 +5207,19 @@ namespace ts {
|
||||
/**
|
||||
* The `activate` hook is invoked when a plugin is activated for the first time within a `Program`.
|
||||
*/
|
||||
activate?(context: CompilerPluginContext, args: CompilerPluginActivationArgs): PromiseLike<CompilerPluginActivationResult | void> | CompilerPluginActivationResult | void;
|
||||
activate?(context: CompilerPluginContext, args: CompilerPluginActivationArgs): CompilerPluginHookResult<CompilerPluginActivationResult | void>;
|
||||
/**
|
||||
* The `preParse` hook is invoked when a new `Program` is about to be created before any files are parsed.
|
||||
*/
|
||||
preParse?(context: CompilerPluginContext, args: CompilerPluginPreParseArgs): PromiseLike<CompilerPluginPreParseResult | void> | CompilerPluginPreParseResult | void;
|
||||
preParse?(context: CompilerPluginContext, args: CompilerPluginPreParseArgs): CompilerPluginHookResult<CompilerPluginPreParseResult | void>;
|
||||
/**
|
||||
* The `preEmit` hook is invoked after type check has completed and immediately before emit.
|
||||
*/
|
||||
preEmit?(context: CompilerPluginContext, args: CompilerPluginPreEmitArgs): PromiseLike<CompilerPluginPreEmitResult | void> | CompilerPluginPreEmitResult | void;
|
||||
preEmit?(context: CompilerPluginContext, args: CompilerPluginPreEmitArgs): CompilerPluginHookResult<CompilerPluginPreEmitResult | void>;
|
||||
/**
|
||||
* The `deactivate` hook is invoked when a plugin should be deactivated so that it can free up any shared resources.
|
||||
*/
|
||||
deactivate?(context: CompilerPluginContext): PromiseLike<void> | void;
|
||||
deactivate?(context: CompilerPluginContext): CompilerPluginHookResult<void>;
|
||||
}
|
||||
|
||||
export interface CompilerPluginResult {
|
||||
@@ -5244,13 +5246,6 @@ namespace ts {
|
||||
preprocessors?: ReadonlyArray<TransformerFactory<SourceFile>>;
|
||||
}
|
||||
|
||||
export interface CompilerPluginPostCreateProgramArgs {
|
||||
readonly program: AsyncProgram;
|
||||
}
|
||||
|
||||
export interface CompilerPluginPostCreateProgramResult extends CompilerPluginResult {
|
||||
}
|
||||
|
||||
export interface CompilerPluginPreEmitArgs {
|
||||
/** The current `Program`. */
|
||||
readonly program: AsyncProgram;
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace ts.codefix {
|
||||
case SyntaxKind.TypeReference:
|
||||
return transformJSDocTypeReference(node as TypeReferenceNode);
|
||||
default:
|
||||
const visited = visitEachChild(node, transformJSDocType, nullTransformationContext); // TODO: GH#18217
|
||||
const visited = visitEachChild(node, transformJSDocType, nullTransformationContext);
|
||||
setEmitFlags(visited, EmitFlags.SingleLine);
|
||||
return visited;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user