Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
// https://github.com/Microsoft/TypeScript/issues/11038
() => function () {
for (let someKey in {}) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
namespace a {
export var b = 10;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
declare class _this { // no error - as no code generation
}
var f = () => this;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
declare var _this: number; // no error as no code gen
var f = () => this;
_this = 10; // Error
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
class _this {
}
var f = () => this;
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
enum _this { // Error
_thisVal1,
_thisVal2,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
function _this() { //Error
return 10;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
namespace _this { //Error
class c {
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @strict: false
var _this = 1;
var f = () => this;
1 change: 1 addition & 0 deletions tests/cases/compiler/declarationEmitPromise.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @declaration: true
// @noImplicitThis: false
// @module: commonjs
// @target: es6

Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/lambdaPropSelf.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
declare var ko: any;

class Person {
Expand Down
1 change: 1 addition & 0 deletions tests/cases/compiler/noParameterReassignmentJSIIFE.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @allowJs: true
// @checkJs: true
// @noEmit: true
// @noImplicitThis: false
// @filename: index.js
self.importScripts = (function (importScripts) {
return function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @strictNullChecks: true
// @strictPropertyInitialization: false

type T1 = { a: number };
type T2 = T1 & { b: number };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @strict: false
export function foo() {
export var x = this;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//// declare var j: J
//// class C {
//// ic: IC
//// m() { this.ic/**/ = j }
//// constructor() { this.ic/**/ = j }
//// }
verify.codeFixAvailable([
{ description: ts.Diagnostics.Add_undefined_to_optional_property_type.message }
Expand All @@ -30,7 +30,7 @@ interface J {
declare var j: J
class C {
ic: IC
m() { this.ic = j }
constructor() { this.ic = j }
}`,
});

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//// a?: number | undefined
//// }
//// declare var j: J
//// class C {
//// interface C {
//// ic2: IC2
//// }
//// var c = new C()
//// declare var c: C
//// c.ic2/**/ = j
verify.codeFixAvailable([
{ description: ts.Diagnostics.Add_undefined_to_optional_property_type.message }
Expand All @@ -29,10 +29,10 @@ interface J {
a?: number | undefined
}
declare var j: J
class C {
interface C {
ic2: IC2
}
var c = new C()
declare var c: C
c.ic2 = j`,
});

Loading