mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-05 00:32:41 -05:00
Remove outdated deprecations (#52314)
This commit is contained in:
@@ -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,
|
||||
));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user