mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
add more test
This commit is contained in:
parent
15469aa4df
commit
37cc265e02
@ -37,6 +37,44 @@ if(module.hot) {
|
||||
});
|
||||
}
|
||||
|
||||
class ModuleData {
|
||||
updated: boolean;
|
||||
}
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept((err: Error) => {
|
||||
//...
|
||||
});
|
||||
|
||||
module.hot.decline("./someModule");
|
||||
|
||||
module.hot.dispose((data: ModuleData) => {
|
||||
data.updated = true;
|
||||
// ...
|
||||
});
|
||||
|
||||
let disposeHandler: ((data: ModuleData) => void) = data => {
|
||||
// ...
|
||||
};
|
||||
module.hot.addDisposeHandler(disposeHandler);
|
||||
module.hot.removeDisposeHandler(disposeHandler);
|
||||
|
||||
module.hot.check(true, (err: Error, outdatedModules: (string|number)[]) => {
|
||||
// ...
|
||||
});
|
||||
|
||||
module.hot.apply({ ignoreUnaccepted: true }, (err: Error, outdatedModules: (string|number)[]) => {
|
||||
// ...
|
||||
});
|
||||
|
||||
var status: string = module.hot.status();
|
||||
let statusHandler: ((status: string) => void) = status => {
|
||||
// ...
|
||||
};
|
||||
module.hot.status(statusHandler);
|
||||
module.hot.addStatusHandler(statusHandler);
|
||||
module.hot.removeStatusHandler(statusHandler);
|
||||
}
|
||||
|
||||
|
||||
var status: string = module.hot.status();
|
||||
|
||||
|
||||
4
webpack/webpack-env.d.ts
vendored
4
webpack/webpack-env.d.ts
vendored
@ -172,11 +172,11 @@ declare namespace __WebpackModuleApi {
|
||||
/**
|
||||
* If true the update process continues even if some modules are not accepted (and would bubble to the entry point).
|
||||
*/
|
||||
ignoreUnaccepted: boolean;
|
||||
ignoreUnaccepted?: boolean;
|
||||
/**
|
||||
* Indicates that apply() is automatically called by check function
|
||||
*/
|
||||
autoApply: boolean;
|
||||
autoApply?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user