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

As a developer I want support for d.ts overloading spanning across the type hierarchy #2406

Open
mmews-n4 opened this issue Jul 7, 2022 · 0 comments

Comments

@mmews-n4
Copy link

mmews-n4 commented Jul 7, 2022

Testcase overloading_with_superclass.n4js.xt (already in repo)

/* XPECT_SETUP org.eclipse.n4js.xpect.tests.N4jsXtTest

	File "def.d.ts" {
		export class Cls1 {
			m(event: string): this;
		}
		export class Cls2 extends Cls1 {
			m(event: number): this;
		}
	}

	END_SETUP
 */

// XPECT noerrors -->
import { Cls2 } from "def"

let cls: Cls2;

// XPECT FIXME noerrors -->
cls.m("message");

// XPECT noerrors -->
cls.m(42);

// XPECT FIXME type of 'fn' --> {function(any+=…):Cls}
// XPECT warnings --> "A reference to method m is created detached from a (correct) this-instance." at "m"
let fn = cls.m;
mmews-n4 pushed a commit that referenced this issue Jul 8, 2022
mmews-n4 pushed a commit that referenced this issue Jul 11, 2022
… plain-js projects (#2408)

* fix load from resource for virtual modules of a dependency

* add test

* detect dts files in plainjs projects

* try to front-check dependencies

* add test for re-export of another plain-js package

* extend test case to combine re-export with export local element

* add test for GH-2406

* add test for GH-2407

* add test for moment/moment-timezone

* fix FIXMEs

* undo main changes to try a different approach

* better approach

* clarify Java doc

* fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant