Fixed compiler & linter issues

This commit is contained in:
Kevin Groat
2019-01-06 20:41:51 -05:00
parent 84b76bf1eb
commit eca3ccbfac
3 changed files with 14 additions and 14 deletions

View File

@@ -18,6 +18,6 @@
},
"files": [
"index.d.ts",
"rx-node-tests.ts"
"workbox-tests.ts"
]
}

View File

@@ -1,3 +1,3 @@
{
"extends": "dtslint/dt.json",
"extends": "dtslint/dt.json"
}

View File

@@ -1,15 +1,15 @@
import { GenerateSW, InjectManifest } from './index'
import { GenerateSW, InjectManifest } from './index';
// GenerateSW
{
let plugin: GenerateSW
let plugin: GenerateSW;
// No options object
plugin = new GenerateSW()
plugin = new GenerateSW();
// Empty options object
plugin = new GenerateSW({})
plugin = new GenerateSW({});
// With all of the examples
plugin = new GenerateSW({
@@ -120,24 +120,24 @@ import { GenerateSW, InjectManifest } from './index'
const manifest = originalManifest.filter(
(entry) => entry.url !== 'ignored.html');
// Optionally, set warning messages.
const warnings = [];
return {manifest, warnings};
const warnings = ['warning'];
return {manifest, warnings: [] };
}
]
})
});
}
// InjectManifest
{
let plugin: InjectManifest
let plugin: InjectManifest;
// No options object
plugin = new InjectManifest()
plugin = new InjectManifest();
// Minimal options object (swSrc is required)
plugin = new InjectManifest({
swSrc: 'service-worker.js'
})
});
// With all of the examples
plugin = new InjectManifest({
@@ -182,9 +182,9 @@ import { GenerateSW, InjectManifest } from './index'
const manifest = originalManifest.filter(
(entry) => entry.url !== 'ignored.html');
// Optionally, set warning messages.
const warnings = [];
const warnings = ['warning'];
return {manifest, warnings};
}
]
})
});
}