Skip to content

Commit 6274733

Browse files
TypeScript annotation fixes
1 parent 5f6f288 commit 6274733

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Microsoft.AspNetCore.SpaServices/npm/aspnet-webpack/src/WebpackDevMiddleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface WebpackConfigFunc {
5050
type WebpackConfigExport = WebpackConfigOrArrayOrThenable | WebpackConfigFunc;
5151
type WebpackConfigModuleExports = WebpackConfigExport | EsModuleExports<WebpackConfigExport>;
5252

53-
function isThenable(obj: any) {
53+
function isThenable<T>(obj: any): obj is Thenable<T> {
5454
return obj && typeof (<Thenable<any>>obj).then === 'function';
5555
}
5656

@@ -262,7 +262,7 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
262262
webpackConfigExport = webpackConfigExport(options.suppliedOptions.EnvParam);
263263
}
264264

265-
const webpackConfigThenable = isThenable(webpackConfigExport)
265+
const webpackConfigThenable: Thenable<WebpackConfigOrArray> = isThenable(webpackConfigExport)
266266
? webpackConfigExport
267267
: { then: callback => callback(webpackConfigExport) };
268268

0 commit comments

Comments
 (0)