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

ts-types-esm: Core.getLibraryResourceBundle missing overrides #343

Open
nlunets opened this issue Mar 8, 2022 · 3 comments
Open

ts-types-esm: Core.getLibraryResourceBundle missing overrides #343

nlunets opened this issue Mar 8, 2022 · 3 comments
Labels
types ES modules types (recommended)

Comments

@nlunets
Copy link
Member

nlunets commented Mar 8, 2022

In Core.getLibraryResourceBundle you now define

getLibraryResourceBundle = function(sLibraryName, sLocale, bAsync)

While looking at the code you actually should have three overrides

getLibraryResourceBundle = function(sLibraryName, sLocale, bAsync)
getLibraryResourceBundle = function(sLibraryName, bAsync)
getLibraryResourceBundle = function(bAsync) 

The return Promise is also of type any when it should be Promise

@nlunets
Copy link
Member Author

nlunets commented Mar 8, 2022

by the way it can be even cooler if you were to do all variant properly

getLibraryResourceBundle(sLibraryName: string, bAsync: true): Promise<ResourceBundle>;
getLibraryResourceBundle(sLibraryName: string, bAsync: false): ResourceBundle;	

getLibraryResourceBundle(sLibraryName: string): ResourceBundle;
...

@codeworrior
Copy link
Member

We're currently working on the missing overrides for signatures like the one of getLibraryResourceBundle.
But we won't manage to do the"cooler" thing yet, documentation doesn't provide enough information to extract the 'real' variants.

@nlunets
Copy link
Member Author

nlunets commented Mar 8, 2022

Having already the proper override would be good :)

@akudev akudev added the types ES modules types (recommended) label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types ES modules types (recommended)
Projects
None yet
Development

No branches or pull requests

3 participants