Remove outdated deprecations (#52314)

This commit is contained in:
Ron Buckton
2023-01-20 12:19:13 -05:00
committed by GitHub
parent 1e99934b29
commit f526e16b2d
11 changed files with 0 additions and 5126 deletions

View File

@@ -1,6 +1,4 @@
import * as ts from "../_namespaces/ts";
import { setEnableDeprecationWarnings } from "../../deprecatedCompat/deprecate";
import { Modifier } from "../_namespaces/ts";
describe("unittests:: FactoryAPI", () => {
function assertSyntaxKind(node: ts.Node, expected: ts.SyntaxKind) {
@@ -85,38 +83,4 @@ describe("unittests:: FactoryAPI", () => {
});
});
describe("deprecations", () => {
beforeEach(() => {
setEnableDeprecationWarnings(false);
});
afterEach(() => {
setEnableDeprecationWarnings(true);
});
// https://github.com/microsoft/TypeScript/issues/50259
it("deprecated createConstructorDeclaration overload does not throw", () => {
const body = ts.factory.createBlock([]);
assert.doesNotThrow(() => ts.factory.createConstructorDeclaration(
/*decorators*/ undefined,
/*modifiers*/ undefined,
/*parameters*/ [],
body,
));
});
// https://github.com/microsoft/TypeScript/issues/50259
it("deprecated updateConstructorDeclaration overload does not throw", () => {
const body = ts.factory.createBlock([]);
const ctor = ts.factory.createConstructorDeclaration(/*modifiers*/ undefined, [], body);
assert.doesNotThrow(() => ts.factory.updateConstructorDeclaration(
ctor,
ctor.decorators,
ctor.modifiers as readonly Modifier[] | undefined,
ctor.parameters,
ctor.body,
));
});
});
});