mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
Fixed dtslint warnings
This commit is contained in:
Vendored
+16
-19
@@ -3,31 +3,28 @@
|
||||
// Definitions by: Luka Maljic <https://github.com/malj>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import * as Koa from 'koa'
|
||||
import * as webpack from 'webpack'
|
||||
import * as webpackDevMiddleware from 'webpack-dev-middleware'
|
||||
import * as webpackHotMiddleware from 'webpack-hot-middleware'
|
||||
import { NextHandleFunction } from 'connect'
|
||||
import * as Koa from 'koa';
|
||||
import * as webpack from 'webpack';
|
||||
import * as webpackDevMiddleware from 'webpack-dev-middleware';
|
||||
import * as webpackHotMiddleware from 'webpack-hot-middleware';
|
||||
import { NextHandleFunction } from 'connect';
|
||||
|
||||
declare function koaWebpack(
|
||||
options?: koaWebpack.Options
|
||||
): Koa.Middleware & koaWebpack.CombinedWebpackMiddleware
|
||||
): Koa.Middleware & koaWebpack.CombinedWebpackMiddleware;
|
||||
|
||||
declare namespace koaWebpack
|
||||
{
|
||||
interface Options
|
||||
{
|
||||
compiler?: webpack.Compiler
|
||||
config?: webpack.Configuration
|
||||
dev?: webpackDevMiddleware.Options
|
||||
hot?: webpackHotMiddleware.Options
|
||||
declare namespace koaWebpack {
|
||||
interface Options {
|
||||
compiler?: webpack.Compiler;
|
||||
config?: webpack.Configuration;
|
||||
dev?: webpackDevMiddleware.Options;
|
||||
hot?: webpackHotMiddleware.Options;
|
||||
}
|
||||
|
||||
interface CombinedWebpackMiddleware
|
||||
{
|
||||
dev: NextHandleFunction & webpackDevMiddleware.WebpackDevMiddleware
|
||||
hot: NextHandleFunction & webpackHotMiddleware.EventStream
|
||||
interface CombinedWebpackMiddleware {
|
||||
dev: NextHandleFunction & webpackDevMiddleware.WebpackDevMiddleware;
|
||||
hot: NextHandleFunction & webpackHotMiddleware.EventStream;
|
||||
}
|
||||
}
|
||||
|
||||
export = koaWebpack
|
||||
export = koaWebpack;
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import * as Koa from 'koa'
|
||||
import * as webpack from 'webpack'
|
||||
import * as koaWebpack from 'koa-webpack'
|
||||
|
||||
const app = new Koa()
|
||||
const config: webpack.Configuration = {}
|
||||
const compiler = webpack(config)
|
||||
import * as Koa from 'koa';
|
||||
import * as webpack from 'webpack';
|
||||
import * as koaWebpack from 'koa-webpack';
|
||||
|
||||
const app = new Koa();
|
||||
const config: webpack.Configuration = {};
|
||||
const compiler = webpack(config);
|
||||
|
||||
// Using the middleware
|
||||
|
||||
@@ -36,15 +35,13 @@ const middleware = koaWebpack({
|
||||
path: '/__what',
|
||||
heartbeat: 2000
|
||||
}
|
||||
})
|
||||
|
||||
app.use(middleware)
|
||||
});
|
||||
|
||||
app.use(middleware);
|
||||
|
||||
// Accessing the underlying middleware
|
||||
|
||||
middleware.dev.close()
|
||||
middleware.dev.invalidate()
|
||||
middleware.dev.waitUntilValid()
|
||||
middleware.hot.publish(null)
|
||||
|
||||
middleware.dev.close();
|
||||
middleware.dev.invalidate();
|
||||
middleware.dev.waitUntilValid();
|
||||
middleware.hot.publish(null);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user