You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The docs page for checking local says that you can call dayjs.locale() with no arguments to get the currently loaded locale. However, the type definition does not allow this. The current definition says that a parameter called preset must be present. This causes typescript to forbid calling locale with no arguments.
Expected behavior
I expected to be able to call locale from typescript like this:
dayjs.locale();
but that is a syntax error
I would have expected the locale definition to be one of the following:
Describe the bug
The docs page for checking local says that you can call dayjs.locale() with no arguments to get the currently loaded locale. However, the type definition does not allow this. The current definition says that a parameter called preset must be present. This causes typescript to forbid calling locale with no arguments.
Expected behavior
I expected to be able to call locale from typescript like this:
but that is a syntax error
I would have expected the locale definition to be one of the following:
Information
The text was updated successfully, but these errors were encountered: