mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
Fixed compiler & linter issues
This commit is contained in:
@@ -18,6 +18,6 @@
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"rx-node-tests.ts"
|
||||
"workbox-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
|
||||
@@ -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};
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user