Skip to content

Commit ee8c7a6

Browse files
authored
chore: remove non used type definitions (#10738)
1 parent cc4be70 commit ee8c7a6

File tree

2 files changed

+2
-55
lines changed

2 files changed

+2
-55
lines changed

packages/vite/src/node/plugins/css.ts

+2
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,8 @@ async function compileCSS(
895895
postcssPlugins.unshift(
896896
(await import('postcss-modules')).default({
897897
...modulesOptions,
898+
// TODO: convert null to undefined (`null` should be removed from `CSSModulesOptions.localsConvention`)
899+
localsConvention: modulesOptions?.localsConvention ?? undefined,
898900
getJSON(
899901
cssFileName: string,
900902
_modules: Record<string, string>,

packages/vite/src/types/shims.d.ts

-55
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ declare module 'cors' {
88
export = cors
99
}
1010

11-
declare module 'selfsigned' {
12-
export function generate(attrs: any, options: any, done?: any): any
13-
}
14-
1511
declare module 'http-proxy' {
1612
const proxy: any
1713
export = proxy
@@ -27,18 +23,6 @@ declare module 'launch-editor-middleware' {
2723
export = plugin
2824
}
2925

30-
declare module 'postcss-load-config' {
31-
import type { Plugin, ProcessOptions } from 'postcss'
32-
function load(
33-
inline: any,
34-
root: string
35-
): Promise<{
36-
options: ProcessOptions
37-
plugins: Plugin[]
38-
}>
39-
export = load
40-
}
41-
4226
declare module 'postcss-import' {
4327
import type { Plugin } from 'postcss'
4428
const plugin: (options: {
@@ -52,45 +36,6 @@ declare module 'postcss-import' {
5236
export = plugin
5337
}
5438

55-
declare module 'postcss-modules' {
56-
import type { Plugin } from 'postcss'
57-
const plugin: (options: any) => Plugin
58-
export = plugin
59-
}
60-
61-
declare module '@rollup/plugin-dynamic-import-vars' {
62-
import type { Plugin } from 'rollup'
63-
import type { BaseNode } from 'estree'
64-
65-
interface Options {
66-
include?: string | RegExp | (string | RegExp)[]
67-
exclude?: string | RegExp | (string | RegExp)[]
68-
warnOnError?: boolean
69-
}
70-
71-
const p: (o?: Options) => Plugin
72-
export default p
73-
export function dynamicImportToGlob(
74-
ast: BaseNode,
75-
source: string
76-
): null | string
77-
}
78-
79-
declare module 'rollup-plugin-web-worker-loader' {
80-
import type { Plugin } from 'rollup'
81-
82-
interface Options {
83-
targetPlatform?: string
84-
pattern?: RegExp
85-
extensions?: string[]
86-
sourcemap?: boolean
87-
inline?: boolean
88-
}
89-
90-
const p: (o?: Options) => Plugin
91-
export default p
92-
}
93-
9439
// LESS' types somewhat references this which doesn't make sense in Node,
9540
// so we have to shim it
9641
declare interface HTMLLinkElement {}

0 commit comments

Comments
 (0)