Skip to content

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

Open

Description

@nlunets

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

Activity

  1. nlunets commented on Mar 8, 2022

    @nlunets
    ContributorAuthor

    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;
    ...
    
  2. codeworrior commented on Mar 8, 2022

    @codeworrior
    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.

  3. nlunets commented on Mar 8, 2022

    @nlunets
    ContributorAuthor

    Having already the proper override would be good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    typesES modules types (recommended)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions