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

[Bug] options are not optional in MessageApiInjection #43

Closed
duskmoon314 opened this issue Jun 9, 2021 · 0 comments · Fixed by #45
Closed

[Bug] options are not optional in MessageApiInjection #43

duskmoon314 opened this issue Jun 9, 2021 · 0 comments · Fixed by #45
Labels
bug Something isn't working types

Comments

@duskmoon314
Copy link

Environment Info

  • Naive UI version: 2.11.4

Bug description

In the doc, options are optional.

error | (content: string, option?: MessageOption) => MessageReactive
info | (content: string, option?: MessageOption) => MessageReactive
loading | (content: string, option?: MessageOption) => MessageReactive
success | (content: string, option?: MessageOption) => MessageReactive
warning | (content: string, option?: MessageOption) => MessageReactive

But in the node_modules\naive-ui\lib\message\src\MessageProvider.d.ts

export interface MessageApiInjection {
    info: (content: string, options: MessageOptions) => MessageReactive;
    success: (content: string, options: MessageOptions) => MessageReactive;
    warning: (content: string, options: MessageOptions) => MessageReactive;
    error: (content: string, options: MessageOptions) => MessageReactive;
    loading: (content: string, options: MessageOptions) => MessageReactive;
}

I think this is a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants