mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
fix(types): correct notice.show getter return type (#1055)
The notice.show getter was declared as boolean while the setter accepts string, Error or false. TypeScript uses the getter return type when checking property assignment, causing TS2322 when assigning a string to notice.show.
This commit is contained in:
1 parent
02d1ded7b8
commit
0b9c31a8cf
1 file changed
+1
-1
+1
-1
@@ -152,7 +152,7 @@ export default class Artplayer extends Player {
|
||||
|
||||
readonly notice: {
|
||||
timer: number | null
|
||||
get show(): boolean
|
||||
get show(): string | Error | false | ''
|
||||
set show(msg: string | Error | false | '')
|
||||
destroy: () => void
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user