Skip to content

Commit 09f9d14

Browse files
committed
Reshaped type definitions and interfaces to .ts if they not belong to declare module
1 parent 47afcf4 commit 09f9d14

20 files changed

+5
-5
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/types/bilibili/live/index.d.ts src/types/bilibili/live/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { DanmuMsg } from './danmu_msg'
2-
import { InteractWord } from './interact_word'
3-
import { SuperChatMessage } from './super_chat_message'
1+
import type { DanmuMsg } from './danmu_msg'
2+
import type { InteractWord } from './interact_word'
3+
import type { SuperChatMessage } from './super_chat_message'
44

55
export type BLiveData = {
66
'DANMU_MSG': DanmuMsg,
@@ -13,7 +13,7 @@ export type BLiveType = keyof BLiveData
1313
export type BLiveDataWild<T = string> = T extends BLiveType ? BLiveData[T] : any
1414

1515

16-
export {
16+
export type {
1717
DanmuMsg,
1818
InteractWord,
1919
SuperChatMessage
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/types/common/schema.d.ts src/types/common/schema.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type Primitive = string | number | boolean | bigint | symbol | null | und
1818

1919
export type KeyType = string | number | symbol
2020

21-
export type ConvertToPrimitive<T extends PrimitiveType> = T extends 'string' ? string :
21+
export type ConvertToPrimitive<T extends Primitive> = T extends 'string' ? string :
2222
T extends 'number' ? number :
2323
T extends 'boolean' ? boolean :
2424
T extends 'bigint' ? bigint :
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)