How to create TypeScript d.ts file of 'class-module' with extending the module -


i'm creating d.ts file class-module, structure below:

import * foo 'foo';  new foo();      // base class new foo.bar();  // foo.bar extends foo new foo.baz();  // extends foo // ... 

this declaration file:

export = foo;  declare class foo {     // ... }  declare namespace foo {     export class bar extends foo {         // ...     }     // ... } 

however got strange suggestions.

new foo();          // valid new foo.bar();      // valid new foo.bar.bar();  // suggested invalid // vscode suggests bar class infinitely new foo.bar.bar.bar.bar. ... bar(); 

how can fix invalid suggestion?


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -