Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(types): simplify type exports #10243

Merged
merged 11 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: move back client types
  • Loading branch information
bluwy committed Sep 25, 2022
commit 7c225e52233f47b28049c04dc3fde60607d323b1
54 changes: 0 additions & 54 deletions packages/vite/api-extractor.client.json

This file was deleted.

23 changes: 0 additions & 23 deletions packages/vite/src/client-types.d.ts

This file was deleted.

16 changes: 0 additions & 16 deletions packages/vite/src/types/customEvent.d.ts

This file was deleted.

61 changes: 0 additions & 61 deletions packages/vite/src/types/hmrPayload.d.ts

This file was deleted.

33 changes: 0 additions & 33 deletions packages/vite/src/types/hot.d.ts

This file was deleted.

97 changes: 0 additions & 97 deletions packages/vite/src/types/importGlob.d.ts

This file was deleted.

25 changes: 0 additions & 25 deletions packages/vite/src/types/importMeta.d.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/vite/src/types/package.json

This file was deleted.

17 changes: 16 additions & 1 deletion packages/vite/types/customEvent.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
export type { CustomEventMap, InferCustomEventPayload } from '../client/types'
import type {
ErrorPayload,
FullReloadPayload,
PrunePayload,
UpdatePayload
} from './hmrPayload'

export interface CustomEventMap {
'vite:beforeUpdate': UpdatePayload
'vite:beforePrune': PrunePayload
'vite:beforeFullReload': FullReloadPayload
'vite:error': ErrorPayload
}

export type InferCustomEventPayload<T extends string> =
T extends keyof CustomEventMap ? CustomEventMap[T] : any
Loading