File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 66 * found in the LICENSE file at https://angular.io/license
77 */
88
9- const { Generator, NgswConfig } = require ( '@angular/service-worker/config' ) ;
9+ const { Generator} = require ( '@angular/service-worker/config' ) ;
1010const fs = require ( 'fs' ) ;
1111const path = require ( 'path' ) ;
1212import { NodeFilesystem } from './filesystem' ;
13+ import { Config } from '../config/src/in' ;
1314
1415
1516const cwd = process . cwd ( ) ;
@@ -18,7 +19,7 @@ const distDir = path.join(cwd, process.argv[2]);
1819const config = path . join ( cwd , process . argv [ 3 ] ) ;
1920const baseHref = process . argv [ 4 ] || '/' ;
2021
21- const configParsed = JSON . parse ( fs . readFileSync ( config ) . toString ( ) ) ;
22+ const configParsed = JSON . parse ( fs . readFileSync ( config ) . toString ( ) ) as Config ;
2223
2324const filesystem = new NodeFilesystem ( distDir ) ;
2425const gen = new Generator ( filesystem , baseHref ) ;
Original file line number Diff line number Diff line change @@ -994,7 +994,7 @@ describe('Driver', () => {
994994 const getClientAssignments = async ( sw : SwTestHarness , baseHref : string ) => {
995995 const cache = await sw . caches . open ( `ngsw:${ baseHref } :db:control` ) as unknown as MockCache ;
996996 const dehydrated = cache . dehydrate ( ) ;
997- return JSON . parse ( dehydrated [ '/assignments' ] . body ! ) ;
997+ return JSON . parse ( dehydrated [ '/assignments' ] . body ! ) as any ;
998998 } ;
999999
10001000 const initializeSwFor = async ( baseHref : string , initialCacheState = '{}' ) => {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class MockBody implements Body {
2929 }
3030
3131 async json ( ) : Promise < any > {
32- return JSON . parse ( this . getBody ( ) ) ;
32+ return JSON . parse ( this . getBody ( ) ) as any ;
3333 }
3434
3535 async text ( ) : Promise < string > {
You can’t perform that action at this time.
0 commit comments