Skip to content

Commit

Permalink
test: enable strict mode testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Jun 26, 2020
1 parent ea49db1 commit 9024f1c
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 16 deletions.
2 changes: 1 addition & 1 deletion integration/common/src/helloworld/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import {enableProdMode} from '@angular/core';
import {platformBrowser} from '@angular/platform-browser';
import {HelloWorldModuleNgFactory} from './app.ngfactory';

window['doBootstrap'] = function() {
(window as any)['doBootstrap'] = function() {
platformBrowser().bootstrapModuleFactory(HelloWorldModuleNgFactory);
};
2 changes: 1 addition & 1 deletion integration/express-engine-ivy-prerender/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
export function app(): express.Express {
const server = express();
const distFolder = join(process.cwd(), 'dist/express-engine-ivy-prerender/browser');
const indexHtml = existsSync(join(distFolder, 'src/home.html')) ? 'src/home.html' : 'index.html';
Expand Down
4 changes: 4 additions & 0 deletions integration/express-engine-ivy-prerender/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
Expand Down
2 changes: 1 addition & 1 deletion integration/express-engine-ivy/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
export function app(): express.Express {
const server = express();
const distFolder = join(process.cwd(), 'dist/express-engine-ivy/browser');
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
Expand Down
2 changes: 1 addition & 1 deletion integration/express-engine-ivy/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (environment.production) {
enableProdMode();
}

window['doBootstrap'] = () => {
(window as any)['doBootstrap'] = () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
};
4 changes: 4 additions & 0 deletions integration/express-engine-ivy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
Expand Down
2 changes: 1 addition & 1 deletion integration/express-engine-ve/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
export function app(): express.Express {
const server = express();
const distFolder = join(process.cwd(), 'dist/express-engine-ve/browser');
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
Expand Down
2 changes: 1 addition & 1 deletion integration/express-engine-ve/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (environment.production) {
enableProdMode();
}

window['doBootstrap'] = () => {
(window as any)['doBootstrap'] = () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
};
4 changes: 4 additions & 0 deletions integration/express-engine-ve/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
Expand Down
2 changes: 1 addition & 1 deletion integration/hapi-engine-ivy/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (environment.production) {
enableProdMode();
}

window['doBootstrap'] = () => {
(window as any)['doBootstrap'] = () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
};
5 changes: 4 additions & 1 deletion integration/hapi-engine-ivy/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"skipLibCheck": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
Expand Down
2 changes: 1 addition & 1 deletion integration/hapi-engine-ve/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (environment.production) {
enableProdMode();
}

window['doBootstrap'] = () => {
(window as any)['doBootstrap'] = () => {
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
};
5 changes: 4 additions & 1 deletion integration/hapi-engine-ve/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"skipLibCheck": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@
"@hapi/hapi": "^18.4.0",
"@schematics/angular": "^10.0.0",
"@types/browser-sync": "^2.26.1",
"@types/express": "4.17.6",
"@types/express": "~4.17.6",
"@types/fs-extra": "^9.0.0",
"@types/hapi__hapi": "^19.0.0",
"@types/hapi__inert": "^5.2.0",
"@types/jasmine": "^3.4.4",
"@types/node": "^12.11.1",
"@types/node": "12.11.1",
"@types/shelljs": "^0.8.6",
"browser-sync": "^2.26.7",
"domino": "^2.1.2",
Expand Down
14 changes: 10 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1577,14 +1577,15 @@
integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==

"@types/express-serve-static-core@*":
version "4.17.5"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.5.tgz#a00ac7dadd746ae82477443e4d480a6a93ea083c"
integrity sha512-578YH5Lt88AKoADy0b2jQGwJtrBxezXtVe/MBqWXKZpqx91SnC0pVkVCcxcytz3lWW+cHBYDi3Ysh0WXc+rAYw==
version "4.17.8"
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.8.tgz#b8f7b714138536742da222839892e203df569d1c"
integrity sha512-1SJZ+R3Q/7mLkOD9ewCBDYD2k0WyZQtWYqF/2VvoNN2/uhI49J9CDN4OAm+wGMA0DbArA4ef27xl4+JwMtGggw==
dependencies:
"@types/node" "*"
"@types/qs" "*"
"@types/range-parser" "*"

"@types/express@4.17.6":
"@types/express@~4.17.6":
version "4.17.6"
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.6.tgz#6bce49e49570507b86ea1b07b806f04697fac45e"
integrity sha512-n/mr9tZI83kd4azlPG5y997C/M4DNABK9yErhFM6hKdym4kkmd9j0vtsJyjFIwfRBxtrxZtAfGZCNRIBMFLK5w==
Expand Down Expand Up @@ -1730,6 +1731,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.37.tgz#cb4782d847f801fa58316da5b4801ca3a59ae790"
integrity sha512-4mXKoDptrXAwZErQHrLzpe0FN/0Wmf5JRniSVIdwUrtDf9wnmEV1teCNLBo/TwuXhkK/bVegoEn/wmb+x0AuPg==

"@types/node@12.11.1":
version "12.11.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.11.1.tgz#1fd7b821f798b7fa29f667a1be8f3442bb8922a3"
integrity sha512-TJtwsqZ39pqcljJpajeoofYRfeZ7/I/OMUQ5pR4q5wOKf2ocrUvBAZUMhWsOvKx3dVc/aaV5GluBivt0sWqA5A==

"@types/object-path@^0.11.0":
version "0.11.0"
resolved "https://registry.yarnpkg.com/@types/object-path/-/object-path-0.11.0.tgz#0b744309b2573dc8bf867ef589b6288be998e602"
Expand Down

0 comments on commit 9024f1c

Please sign in to comment.