Skip to content

Commit

Permalink
chore: remove non used type definitions (#10738)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Oct 31, 2022
1 parent cc4be70 commit ee8c7a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 55 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,8 @@ async function compileCSS(
postcssPlugins.unshift(
(await import('postcss-modules')).default({
...modulesOptions,
// TODO: convert null to undefined (`null` should be removed from `CSSModulesOptions.localsConvention`)
localsConvention: modulesOptions?.localsConvention ?? undefined,
getJSON(
cssFileName: string,
_modules: Record<string, string>,
Expand Down
55 changes: 0 additions & 55 deletions packages/vite/src/types/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ declare module 'cors' {
export = cors
}

declare module 'selfsigned' {
export function generate(attrs: any, options: any, done?: any): any
}

declare module 'http-proxy' {
const proxy: any
export = proxy
Expand All @@ -27,18 +23,6 @@ declare module 'launch-editor-middleware' {
export = plugin
}

declare module 'postcss-load-config' {
import type { Plugin, ProcessOptions } from 'postcss'
function load(
inline: any,
root: string
): Promise<{
options: ProcessOptions
plugins: Plugin[]
}>
export = load
}

declare module 'postcss-import' {
import type { Plugin } from 'postcss'
const plugin: (options: {
Expand All @@ -52,45 +36,6 @@ declare module 'postcss-import' {
export = plugin
}

declare module 'postcss-modules' {
import type { Plugin } from 'postcss'
const plugin: (options: any) => Plugin
export = plugin
}

declare module '@rollup/plugin-dynamic-import-vars' {
import type { Plugin } from 'rollup'
import type { BaseNode } from 'estree'

interface Options {
include?: string | RegExp | (string | RegExp)[]
exclude?: string | RegExp | (string | RegExp)[]
warnOnError?: boolean
}

const p: (o?: Options) => Plugin
export default p
export function dynamicImportToGlob(
ast: BaseNode,
source: string
): null | string
}

declare module 'rollup-plugin-web-worker-loader' {
import type { Plugin } from 'rollup'

interface Options {
targetPlatform?: string
pattern?: RegExp
extensions?: string[]
sourcemap?: boolean
inline?: boolean
}

const p: (o?: Options) => Plugin
export default p
}

// LESS' types somewhat references this which doesn't make sense in Node,
// so we have to shim it
declare interface HTMLLinkElement {}

0 comments on commit ee8c7a6

Please sign in to comment.