Skip to content

Commit

Permalink
chore: fix types (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Nov 16, 2022
1 parent 8a87bb9 commit ee76d4f
Show file tree
Hide file tree
Showing 18 changed files with 1,550 additions and 1,547 deletions.
3,054 changes: 1,528 additions & 1,526 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -80,7 +80,7 @@
"sass": "^1.55.0",
"sass-loader": "^12.6.0",
"standard-version": "^9.3.0",
"typescript": "^4.7.4",
"typescript": "^4.9.3",
"webpack": "^5.74.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.11.1"
Expand Down
Expand Up @@ -73,7 +73,7 @@ __webpack_require__.r(__webpack_exports__);
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("1ae3df98b6be4a363534")
/******/ __webpack_require__.h = () => ("c4400460abdfefdd41ec")
/******/ })();
/******/
/******/ /* webpack/runtime/global */
Expand Down Expand Up @@ -130,8 +130,7 @@ __webpack_require__.r(__webpack_exports__);
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
5 changes: 2 additions & 3 deletions test/cases/chunkFilename-fullhash/expected/webpack-5/main.js
Expand Up @@ -73,7 +73,7 @@ __webpack_require__.r(__webpack_exports__);
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ (() => {
/******/ __webpack_require__.h = () => ("47fcfccba07af5e0227d")
/******/ __webpack_require__.h = () => ("03b0b5d315f22aa63867")
/******/ })();
/******/
/******/ /* webpack/runtime/global */
Expand Down Expand Up @@ -130,8 +130,7 @@ __webpack_require__.r(__webpack_exports__);
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 1 addition & 2 deletions test/cases/hmr/expected/main.js
Expand Up @@ -499,8 +499,7 @@ __webpack_require__.r(__webpack_exports__);
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 1 addition & 2 deletions test/cases/insert-function/expected/main.js
Expand Up @@ -114,8 +114,7 @@
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 1 addition & 2 deletions test/cases/insert-string/expected/main.js
Expand Up @@ -114,8 +114,7 @@
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 1 addition & 2 deletions test/cases/insert-undefined/expected/main.js
Expand Up @@ -114,8 +114,7 @@
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 1 addition & 2 deletions test/cases/no-runtime/expected/main.js
Expand Up @@ -116,8 +116,7 @@ __webpack_require__.r(__webpack_exports__);
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
@@ -1,5 +1,5 @@
body {
background: green;
background-image: url(http://example.com/47e6924dce47554c1058/c9e192c015437a21dea1.svg);
background-image: url(http://example.com/0ecdbda184223cdb3d36/c9e192c015437a21dea1.svg);
}

@@ -1,5 +1,5 @@
body {
background: red;
background-image: url(http://example.com/220588b7ee0332ae20e5/c9e192c015437a21dea1.svg);
background-image: url(http://example.com/398b3f33c59de2ae9221/c9e192c015437a21dea1.svg);
}

3 changes: 1 addition & 2 deletions test/cases/runtime/expected/runtime~main.js
Expand Up @@ -189,8 +189,7 @@
/******/ script.parentNode && script.parentNode.removeChild(script);
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
/******/ if(prev) return prev(event);
/******/ }
/******/ ;
/******/ };
/******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
/******/ script.onload = onScriptComplete.bind(null, script.onload);
Expand Down
3 changes: 3 additions & 0 deletions types/loader.d.ts
Expand Up @@ -7,6 +7,9 @@ export type Source = import("webpack").sources.Source;
export type AssetInfo = import("webpack").AssetInfo;
export type NormalModule = import("webpack").NormalModule;
export type LoaderOptions = import("./index.js").LoaderOptions;
export type Locals = {
[key: string]: string | Function;
};
export type TODO = any;
export type Dependency = {
identifier: string;
Expand Down
6 changes: 6 additions & 0 deletions types/utils.d.ts
Expand Up @@ -48,6 +48,12 @@ export function stringifyRequest(
loaderContext: LoaderContext,
request: string
): string;
/**
*
* @param {string | function} value
* @returns {string}
*/
export function stringifyLocal(value: string | Function): string;
/**
* @param {string} filename
* @param {string} outputPath
Expand Down

0 comments on commit ee76d4f

Please sign in to comment.