Skip to content

Commit e24993a

Browse files
fix: solving type issues on yarn build:ssr command
1 parent f73d4b6 commit e24993a

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Fixed
1111

1212
- Using `ngAcceptInputType_count` for template checking in count input. That solves issue https://github.com/willmendesneto/ngx-skeleton-loader/issues/59. You can find more details about it in https://angular.io/guide/template-typecheck
13+
- Fixing type issues on `yarn build:ssr` command
1314

1415
### Updated
1516

projects/ngx-skeleton-loader/src/lib/ngx-skeleton-loader.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { start, end } from 'perf-marks/marks';
1010
export class NgxSkeletonLoaderComponent implements OnInit, AfterViewInit, OnDestroy {
1111
// tslint:disable-next-line: variable-name
1212
static ngAcceptInputType_count: number | string;
13+
// tslint:disable-next-line: variable-name
14+
static ngAcceptInputType_animation: boolean | string;
1315

1416
@Input()
1517
count = 1;

server.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,26 @@ export function app() {
1515
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
1616

1717
// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
18-
server.engine('html', ngExpressEngine({
19-
bootstrap: AppServerModule,
20-
}));
18+
server.engine(
19+
'html',
20+
ngExpressEngine({
21+
bootstrap: AppServerModule,
22+
// tslint:disable-next-line: no-any
23+
}) as any,
24+
);
2125

2226
server.set('view engine', 'html');
2327
server.set('views', distFolder);
2428

2529
// Example Express Rest API endpoints
2630
// server.get('/api/**', (req, res) => { });
2731
// Serve static files from /browser
28-
server.get('*.*', express.static(distFolder, {
29-
maxAge: '1y'
30-
}));
32+
server.get(
33+
'*.*',
34+
express.static(distFolder, {
35+
maxAge: '1y',
36+
}),
37+
);
3138

3239
// All regular routes use the Universal engine
3340
server.get('*', (req, res) => {
@@ -52,7 +59,7 @@ function run() {
5259
// The below code is to ensure that the server is run only when not requiring the bundle.
5360
declare const __non_webpack_require__: NodeRequire;
5461
const mainModule = __non_webpack_require__.main;
55-
const moduleFilename = mainModule && mainModule.filename || '';
62+
const moduleFilename = (mainModule && mainModule.filename) || '';
5663
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
5764
run();
5865
}

tsconfig.server.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"compilerOptions": {
44
"outDir": "./out-tsc/app-server",
55
"module": "commonjs",
6+
"strictNullChecks": false,
67
"types": [
78
"node"
89
]

0 commit comments

Comments
 (0)