diff --git a/demo/package.json b/demo/package.json index e9a157a26..63156a8c7 100644 --- a/demo/package.json +++ b/demo/package.json @@ -8,7 +8,7 @@ "dependencies": { "minimist": "^1.2.3", "tsickle": "file:../", - "typescript": "5.0.4" + "typescript": "5.1.5" }, "devDependencies": { "@types/minimist": "1.2.0", diff --git a/package.json b/package.json index 454112a61..ebe2e87ca 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "out/src/*" ], "peerDependencies": { - "typescript": "~5.0.4" + "typescript": "~5.1.5" }, "devDependencies": { "@types/diff-match-patch": "^1.0.32", @@ -28,7 +28,7 @@ "source-map-support": "^0.5.19", "tslib": "^2.2.0", "tslint": "^6.1.3", - "typescript": "5.0.4" + "typescript": "5.1.5" }, "scripts": { "build": "tsc", diff --git a/test_files/class_decorator/class_decorator.js b/test_files/class_decorator/class_decorator.js deleted file mode 100644 index db126c578..000000000 --- a/test_files/class_decorator/class_decorator.js +++ /dev/null @@ -1,89 +0,0 @@ -goog.module('test_files.class_decorator.class_decorator'); -var module = module || { id: 'test_files/class_decorator/class_decorator.ts' }; -const tslib_1 = goog.require('tslib'); -/** - * - * @fileoverview Ensure the JsDoc comments on the generated JS calls to - * tslib_1.__decorate() do not contain template annotations. - * - * Template and abstract annotations of decorated class declarations get cloned - * to the generated __decorate() call which makes the JSCompiler unhappy. This - * test ensures that those annotations are removed from the JSDoc comments of - * __decorate() calls. - * - * Generated from: test_files/class_decorator/class_decorator.ts - */ -/** - * @param {?} t - * @return {?} - */ -function classyClass(t) { - return t; -} -/** - * @template T - */ -let ClassyFoo = /** - * @template T - */ -class ClassyFoo { -}; -ClassyFoo = tslib_1.__decorate([ - classyClass -], ClassyFoo); -/** - * Non-synthetic comment - * @template T - */ -let ClassyBar = /** - * Non-synthetic comment - * @template T - */ -class ClassyBar { -}; -/** - * Non-synthetic comment - */ -ClassyBar = tslib_1.__decorate([ - classyClass -], ClassyBar); -/** - * @abstract - */ -let AbstractBar = /** - * @abstract - */ -class AbstractBar { -}; -AbstractBar = tslib_1.__decorate([ - classyClass -], AbstractBar); -/** - * Ensure other annotations are preserved, e.g. the suppress annotation. - * \@soyCompatible - * @final - * @suppress {visibility} - * @template T - * @extends {ClassyBar} - */ -let AnotherClassyBar = /** - * Ensure other annotations are preserved, e.g. the suppress annotation. - * \@soyCompatible - * @final - * @suppress {visibility} - * @template T - * @extends {ClassyBar} - */ -class AnotherClassyBar extends ClassyBar { -}; -/** - * Ensure other annotations are preserved, e.g. the suppress annotation. - * \\@soyCompatible - * @final - * @suppress {visibility} - */ -AnotherClassyBar = tslib_1.__decorate([ - classyClass -], AnotherClassyBar); -exports.AnotherClassyBar = AnotherClassyBar; -exports.AnotherClassyBarUnderAnotherName = AnotherClassyBar; diff --git a/test_files/class_decorator/class_decorator.ts b/test_files/class_decorator/class_decorator.ts deleted file mode 100644 index aa5d700c8..000000000 --- a/test_files/class_decorator/class_decorator.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * @fileoverview Ensure the JsDoc comments on the generated JS calls to - * tslib_1.__decorate() do not contain template annotations. - * - * Template and abstract annotations of decorated class declarations get cloned - * to the generated __decorate() call which makes the JSCompiler unhappy. This - * test ensures that those annotations are removed from the JSDoc comments of - * __decorate() calls. - */ - -export {}; - -function classyClass(t: any) { - return t; -} - -@classyClass -class ClassyFoo { -} - -/** Non-synthetic comment */ -@classyClass -class ClassyBar { -} - -@classyClass -abstract class AbstractBar { -} - -/** - * Ensure other annotations are preserved, e.g. the suppress annotation. - * @soyCompatible - * @final - * @suppress {visibility} - */ -@classyClass -export class AnotherClassyBar extends ClassyBar { -} - -export {AnotherClassyBar as AnotherClassyBarUnderAnotherName}; diff --git a/test_files/namespaced.no_nstransform/merged_namespace.js b/test_files/namespaced.no_nstransform/merged_namespace.js index e020b3e9a..d16313489 100644 --- a/test_files/namespaced.no_nstransform/merged_namespace.js +++ b/test_files/namespaced.no_nstransform/merged_namespace.js @@ -22,7 +22,7 @@ exports.Foo = Foo; class Nested { } Foo.Nested = Nested; -})(Foo = exports.Foo || (exports.Foo = {})); +})(Foo || (Foo = {})); /** * @return {void} */ @@ -32,7 +32,7 @@ exports.bar = bar; class Nested { } bar.Nested = Nested; -})(bar = exports.bar || (exports.bar = {})); +})(bar || (bar = {})); class Baz { } exports.Baz = Baz; diff --git a/test_files/namespaced.no_nstransform/reopen_ns.js b/test_files/namespaced.no_nstransform/reopen_ns.js index d310ed58f..6e3fb0f1c 100644 --- a/test_files/namespaced.no_nstransform/reopen_ns.js +++ b/test_files/namespaced.no_nstransform/reopen_ns.js @@ -17,10 +17,11 @@ exports = {}; var ns; (function (ns) { ns.x = 0; -})(ns = exports.ns || (exports.ns = {})); +})(ns || (ns = {})); +exports.ns = ns; (function (ns) { ns.y = 0; -})(ns = exports.ns || (exports.ns = {})); +})(ns || (ns = {})); // this implicitly re-emits `ns = exports.ns || (exports.ns = {}));`, so it is // in a way reopening ns, which can cause issues with Closure unless the right // suppressions are present. @@ -29,4 +30,4 @@ var ns; (function (bar) { bar.y = 0; })(bar = ns.bar || (ns.bar = {})); -})(ns = exports.ns || (exports.ns = {})); +})(ns || (ns = {})); diff --git a/test_files/readonly/readonly.js b/test_files/readonly/readonly.js index 7c994c7dc..880045022 100644 --- a/test_files/readonly/readonly.js +++ b/test_files/readonly/readonly.js @@ -18,8 +18,8 @@ class Class { this.normalProp = ''; } } -Class.staticProp = ''; exports.Class = Class; +Class.staticProp = ''; /* istanbul ignore if */ if (false) { /**