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
1 change: 1 addition & 0 deletions e2e/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@
"experimentalDecorators": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"inlineSources": true,
"lib": ["es2015"],
"module": "commonjs",
Expand Down
2 changes: 1 addition & 1 deletion e2e/util/asserts.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,6 +34,6 @@ export function expectLocation(element: FinderResult, {x, y}: Point): void {
*/
export function expectAlignedWith(element: FinderResult, otherElement: FinderResult): void {
getElement(otherElement).getLocation().then((location: Point) => {
this.expectLocation(getElement(element), location);
expectLocation(getElement(element), location);
});
}
1 change: 1 addition & 0 deletions src/bazel-tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,6 +13,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"newLine": "lf",
"module": "es2015",
Expand Down
1 change: 1 addition & 0 deletions src/cdk-experimental/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"newLine": "lf",
"module": "es2015",
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -509,7 +509,7 @@ describe('InteractivityChecker', () => {
}
}

function runIf(condition: boolean, runFn: Function): () => void {
function runIf(this: any, condition: boolean, runFn: Function): () => void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a second, I thought that this is an actual parameter.

return (...args: any[]) => {
if (condition) {
runFn.apply(this, args);
Expand Down
12 changes: 8 additions & 4 deletions src/cdk/a11y/key-manager/list-key-manager.spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,6 +37,10 @@ class FakeQueryList<T> extends QueryList<T> {
notifyOnChanges() { this.changes.next(this); }
}

interface KeyEventTestContext {
nextKeyEvent: KeyboardEvent;
prevKeyEvent: KeyboardEvent;
}

describe('Key managers', () => {
let itemList: FakeQueryList<any>;
Expand DownExpand Up@@ -164,7 +168,7 @@ describe('Key managers', () => {
expect(fakeKeyEvents.downArrow.defaultPrevented).toBe(false);
});

describe('with `vertical` direction', () => {
describe('with `vertical` direction', function(this: KeyEventTestContext) {
beforeEach(() => {
keyManager.withVerticalOrientation();
this.nextKeyEvent = createKeyboardEvent('keydown', DOWN_ARROW);
Expand All@@ -174,7 +178,7 @@ describe('Key managers', () => {
runDirectionalKeyTests.call(this);
});

describe('with `ltr` direction', () => {
describe('with `ltr` direction', function(this: KeyEventTestContext) {
beforeEach(() => {
keyManager.withHorizontalOrientation('ltr');
this.nextKeyEvent = createKeyboardEvent('keydown', RIGHT_ARROW);
Expand All@@ -184,7 +188,7 @@ describe('Key managers', () => {
runDirectionalKeyTests.call(this);
});

describe('with `rtl` direction', () => {
describe('with `rtl` direction', function(this: KeyEventTestContext) {
beforeEach(() => {
keyManager.withHorizontalOrientation('rtl');
this.nextKeyEvent = createKeyboardEvent('keydown', LEFT_ARROW);
Expand All@@ -199,7 +203,7 @@ describe('Key managers', () => {
* parameters have to be passed in via Jasmine's context object (`this` inside a `beforeEach`)
* because this function has to run before any `beforeEach`, `beforeAll` etc. hooks.
*/
function runDirectionalKeyTests() {
function runDirectionalKeyTests(this: KeyEventTestContext) {
it('should set subsequent items as active when the next key is pressed', () => {
keyManager.onKeydown(this.nextKeyEvent);

Expand Down
1 change: 1 addition & 0 deletions src/demo-app/tsconfig-aot.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"outDir": "../../dist/packages/demo-app",
"rootDirs": [
".",
Expand Down
1 change: 1 addition & 0 deletions src/demo-app/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@
"noUnusedParameters": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"lib": ["es6", "es2015", "dom"],
"skipLibCheck": true,
"module": "commonjs",
Expand Down
1 change: 1 addition & 0 deletions src/e2e-app/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@
// strict-null compliant.
"strictNullChecks": false,
"strictFunctionTypes": true,
"noImplicitThis": true,
"lib": ["es6", "es2015", "dom"],
"module": "commonjs",
"moduleResolution": "node",
Expand Down
1 change: 1 addition & 0 deletions src/lib/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"newLine": "lf",
"module": "es2015",
Expand Down
1 change: 1 addition & 0 deletions src/material-examples/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"module": "es2015",
"moduleResolution": "node",
Expand Down
1 change: 1 addition & 0 deletions src/material-experimental/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"newLine": "lf",
"module": "es2015",
Expand Down
1 change: 1 addition & 0 deletions src/material-moment-adapter/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -11,6 +11,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"importHelpers": true,
"newLine": "lf",
"module": "es2015",
Expand Down
1 change: 1 addition & 0 deletions src/universal-app/tsconfig-build.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": ".",
Expand Down
1 change: 1 addition & 0 deletions src/universal-app/tsconfig-prerender.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": ".",
Expand Down
2 changes: 1 addition & 1 deletion test/angular-test-init-spec.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ function patchTestBedToDestroyFixturesAfterEveryTest(testBedInstance: TestBed) {
// Monkey-patch the resetTestingModule to destroy fixtures outside of a try/catch block.
// With https://github.com/angular/angular/commit/2c5a67134198a090a24f6671dcdb7b102fea6eba
// errors when destroying components are no longer causing Jasmine to fail.
testBedInstance.resetTestingModule = function() {
testBedInstance.resetTestingModule = function(this: {_activeFixtures: ComponentFixture<any>[]}) {
try {
this._activeFixtures.forEach((fixture: ComponentFixture<any>) => fixture.destroy());
} finally {
Expand Down
1 change: 1 addition & 0 deletions tools/dashboard/functions/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,6 +7,7 @@
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"sourceMap": true,
"target": "es5",
"baseUrl": "",
Expand Down
1 change: 1 addition & 0 deletions tools/dgeni/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
"outDir": "../../dist/tools/dgeni",
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noEmitOnError": true,
"noImplicitAny": true,
"target": "es5",
Expand Down
6 changes: 3 additions & 3 deletions tools/gulp/tasks/docs.ts
Original file line numberDiff line numberDiff line change
Expand Up@@ -204,11 +204,11 @@ function fixMarkdownDocLinks(link: string, filePath: string): string {
* @param classPrefix The prefix to use for the alias class.
*/
function createTagNameAliaser(classPrefix: string) {
return function() {
return function(this: HTMLElement) {
MARKDOWN_TAGS_TO_CLASS_ALIAS.forEach(tag => {
for (let el of this.querySelectorAll(tag)) {
Array.from(this.querySelectorAll(tag)).forEach(el => {
el.classList.add(`${classPrefix}-${tag}`);
}
});
});

return this;
Expand Down
1 change: 1 addition & 0 deletions tools/gulp/tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
"outDir": "../../dist/tools/gulp",
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noEmitOnError": true,
"noImplicitAny": true,
"target": "es5",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,6 +10,7 @@
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitAny": true,
"noImplicitThis": true,
"skipLibCheck": true,
"target": "es2015",
"lib": ["es5", "es2015", "dom"],
Expand Down