Fix up public API

This commit is contained in:
Ron Buckton
2019-11-25 15:30:58 -08:00
parent 4b1b651424
commit 5def1a0a4c
4 changed files with 8 additions and 16 deletions
-4
View File
@@ -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",
+1
View File
@@ -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
View File
@@ -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;
}