Skip to content

Commit

Permalink
Remove unnecessary backwards compat check
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 16, 2025
1 parent b66fb03 commit bdf98f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/compiler/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3689,10 +3689,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
emitTokenWithComment(node.phaseModifier, node.pos, writeKeyword, node);
writeSpace();
}
else if (node.isTypeOnly) {
emitTokenWithComment(SyntaxKind.TypeKeyword, node.pos, writeKeyword, node);
writeSpace();
}
emit(node.name);
if (node.name && node.namedBindings) {
emitTokenWithComment(SyntaxKind.CommaToken, node.name.end, writePunctuation, node);
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,7 @@ export type NamedExportBindings =
export interface ImportClause extends NamedDeclaration {
readonly kind: SyntaxKind.ImportClause;
readonly parent: ImportDeclaration | JSDocImportTag;
/** @deprecated */ readonly isTypeOnly: boolean | "hello";
/** @deprecated */ readonly isTypeOnly: boolean;
readonly phaseModifier: undefined | ImportPhaseModifier;
readonly name?: Identifier; // Default binding
readonly namedBindings?: NamedImportBindings;
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5516,7 +5516,7 @@ declare namespace ts {
interface ImportClause extends NamedDeclaration {
readonly kind: SyntaxKind.ImportClause;
readonly parent: ImportDeclaration | JSDocImportTag;
/** @deprecated */ readonly isTypeOnly: boolean | "hello";
/** @deprecated */ readonly isTypeOnly: boolean;
readonly phaseModifier: undefined | ImportPhaseModifier;
readonly name?: Identifier;
readonly namedBindings?: NamedImportBindings;
Expand Down

0 comments on commit bdf98f5

Please sign in to comment.