Ben_Ho
August 22, 2022, 5:13am
#1
Currently what I am seeing from my local:
What I see from the doc:
+1 I noticed the same issue.
Passing the NotificationOptions argument with as any
makes the warning go away and allows the code to compile, but it appears the onDequeue & button keys are not actually used — I suspect the documentation might be incorrect.
Figma hasn’t released this API yet, but has been added to the typings on GitHub.
id: string
}
interface ClientStorageAPI {
getAsync(key: string): Promise<any | undefined>
setAsync(key: string, value: any): Promise<void>
deleteAsync(key: string): Promise<void>
keysAsync(): Promise<string[]>
}
interface NotificationOptions {
timeout?: number
error?: boolean
onDequeue?: (reason: NotifyDequeueReason) => void
button?: {
text: string
action: () => boolean | void
}
}
type NotifyDequeueReason = 'timeout' | 'dismiss' | 'action_button_click'
tank666
September 1, 2022, 12:22pm
#5
Now this API is released.
2 Likes