refactor: strictly typed

This commit is contained in:
harttle
2019-02-23 00:49:54 +08:00
parent 51f7e66f60
commit 5b6100d12b
86 changed files with 2630 additions and 2590 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ const resolve = fs.resolve
describe('fs/browser', function () {
describe('#resolve()', function () {
if (+process.version.match(/^v(\d+)/)[1] < 8) {
if (+(process.version.match(/^v(\d+)/) as RegExpMatchArray)[1] < 8) {
console.info('jsdom not supported, skipping template-browser...')
return
}
@@ -54,9 +54,9 @@ describe('fs/browser', function () {
})
describe('#readFile()', () => {
let server
let server: sinon.SinonFakeServer
beforeEach(() => {
server = sinon.createFakeServer()
server = sinon.fakeServer.create()
server.autoRespond = true
server.respondWith('GET', 'https://example.com/views/hello.html',
[200, { 'Content-Type': 'text/plain' }, 'hello {{name}}']);