Skip to content

Commit db57c8e

Browse files
committed
chore: Remove unnecssary 'Omit' types
1 parent 7e37e11 commit db57c8e

File tree

13 files changed

+14
-24
lines changed

13 files changed

+14
-24
lines changed

src/core/builders/vite/plugins/bundleAnalysis.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import path from 'node:path';
55

66
let increment = 0;
77

8-
export function bundleAnalysis(
9-
config: Omit<ResolvedConfig, 'builder'>,
10-
): vite.Plugin {
8+
export function bundleAnalysis(config: ResolvedConfig): vite.Plugin {
119
return visualizer({
1210
template: 'raw-data',
1311
filename: path.resolve(

src/core/builders/vite/plugins/cssEntrypoints.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { getEntrypointBundlePath } from '~/core/utils/entrypoints';
1414
*/
1515
export function cssEntrypoints(
1616
entrypoint: Entrypoint,
17-
config: Omit<ResolvedConfig, 'builder'>,
17+
config: ResolvedConfig,
1818
): vite.Plugin {
1919
return {
2020
name: 'wxt:css-entrypoint',

src/core/builders/vite/plugins/devHtmlPrerender.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let reactRefreshPreamble = '';
1212
* Pre-renders the HTML entrypoints when building the extension to connect to the dev server.
1313
*/
1414
export function devHtmlPrerender(
15-
config: Omit<ResolvedConfig, 'builder'>,
15+
config: ResolvedConfig,
1616
server: WxtDevServer | undefined,
1717
): vite.PluginOption {
1818
const htmlReloadId = '@wxt/reload-html';
@@ -133,7 +133,7 @@ export function devHtmlPrerender(
133133
}
134134

135135
export function pointToDevServer(
136-
config: Omit<ResolvedConfig, 'builder'>,
136+
config: ResolvedConfig,
137137
server: WxtDevServer,
138138
id: string,
139139
document: Document,

src/core/builders/vite/plugins/devServerGlobals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ResolvedConfig, WxtDevServer } from '~/types';
55
* Defines global constants about the dev server. Helps scripts connect to the server's web socket.
66
*/
77
export function devServerGlobals(
8-
config: Omit<ResolvedConfig, 'builder'>,
8+
config: ResolvedConfig,
99
server: WxtDevServer | undefined,
1010
): Plugin {
1111
return {

src/core/builders/vite/plugins/download.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { fetchCached } from '~/core/utils/network';
99
* @example
1010
* import "url:https://google-tagmanager.com/gtag?id=XYZ";
1111
*/
12-
export function download(config: Omit<ResolvedConfig, 'builder'>): Plugin {
12+
export function download(config: ResolvedConfig): Plugin {
1313
return {
1414
name: 'wxt:download',
1515
resolveId(id) {

src/core/builders/vite/plugins/excludeBrowserPolyfill.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import type * as vite from 'vite';
66
* `webextension-polyfill` module to a virtual module and exporting the `chrome` global from the
77
* virtual module.
88
*/
9-
export function excludeBrowserPolyfill(
10-
config: Omit<ResolvedConfig, 'builder'>,
11-
): vite.Plugin {
9+
export function excludeBrowserPolyfill(config: ResolvedConfig): vite.Plugin {
1210
const virtualId = 'virtual:wxt-webextension-polyfill-disabled';
1311

1412
return {

src/core/builders/vite/plugins/globals.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import type * as vite from 'vite';
22
import { ResolvedConfig } from '~/types';
33
import { getGlobals } from '~/core/utils/globals';
44

5-
export function globals(
6-
config: Omit<ResolvedConfig, 'builder'>,
7-
): vite.PluginOption {
5+
export function globals(config: ResolvedConfig): vite.PluginOption {
86
return {
97
name: 'wxt:globals',
108
config() {

src/core/builders/vite/plugins/multipageMove.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { normalizePath } from '~/core/utils/paths';
2020
*/
2121
export function multipageMove(
2222
entrypoints: Entrypoint[],
23-
config: Omit<ResolvedConfig, 'builder'>,
23+
config: ResolvedConfig,
2424
): vite.Plugin {
2525
return {
2626
name: 'wxt:multipage-move',

src/core/builders/vite/plugins/tsconfigPaths.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import { ResolvedConfig } from '~/types';
22
import type * as vite from 'vite';
33

4-
export function tsconfigPaths(
5-
config: Omit<ResolvedConfig, 'builder'>,
6-
): vite.Plugin {
4+
export function tsconfigPaths(config: ResolvedConfig): vite.Plugin {
75
return {
86
name: 'wxt:aliases',
97
async config() {

src/core/builders/vite/plugins/unimport.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ const ENABLED_EXTENSIONS = new Set([
1515
/**
1616
* Inject any global imports defined by unimport
1717
*/
18-
export function unimport(
19-
config: Omit<ResolvedConfig, 'builder'>,
20-
): vite.PluginOption {
18+
export function unimport(config: ResolvedConfig): vite.PluginOption {
2119
const options = config.imports;
2220
if (options === false) return [];
2321

0 commit comments

Comments
 (0)