Skip to content

Commit 6dbba24

Browse files
committed
chore: improve types
1 parent 68617b2 commit 6dbba24

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/repack/src/commands/rspack/start.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ export async function start(
8686

8787
const { createServer } = await import('@callstack/repack-dev-server');
8888
const { start, stop } = await createServer({
89-
// @ts-ignore
9089
options: {
9190
...devServerOptions,
9291
rootDir: cliConfig.root,

packages/repack/src/plugins/DevelopmentPlugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'node:path';
2-
// @ts-ignore
32
import type { DevServerOptions } from '@callstack/repack-dev-server';
43
import type {
54
Compiler,
@@ -105,7 +104,7 @@ export class DevelopmentPlugin implements RspackPluginInstance {
105104

106105
const host = compiler.options.devServer.host;
107106
const port = compiler.options.devServer.port;
108-
// @ts-ignore
107+
// @ts-expect-error: devServertypes here are not being overridden properly
109108
const protocol = this.getProtocolType(compiler.options.devServer);
110109
const platform = this.config.platform ?? (compiler.options.name as string);
111110

packages/repack/src/types/dev-server-options.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { DevServerOptions } from '@callstack/repack-dev-server';
2+
import type { RspackOptions } from '@rspack/core';
23

34
// extend webpack Configuration with devServer field
45
declare module 'webpack' {
@@ -9,5 +10,7 @@ declare module 'webpack' {
910

1011
// override rspack DevServer type
1112
declare module '@rspack/core' {
12-
export interface DevServer extends DevServerOptions {}
13+
export interface Configuration extends RspackOptions {
14+
devServer?: DevServerOptions;
15+
}
1316
}

0 commit comments

Comments
 (0)