Skip to content

Implementation of interface requires members redeclaration - inside definition file #16303

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

Closed
CzBuCHi opened this issue Jun 6, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@CzBuCHi
Copy link

CzBuCHi commented Jun 6, 2017

TypeScript Version: 2.3.2
Code:

// external_library.d.ts
interface A {
    foo: Function;
}
declare class B implements A { 
}

Expected behavior: no error
Actual behavior: error: Class 'B' incorrectly implements interface 'A'

This is sort of duplicate of #5749 or #340 except class is declared in d.ts file and implemented by javascript

Why: Currently is needed to copy all declarations from A into B... -> duplicate code

@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jun 6, 2017
@RyanCavanaugh
Copy link
Member

Not sure what makes this a not-exact-duplicate of #340. See #340 (comment)

@RyanCavanaugh RyanCavanaugh added Duplicate An existing issue was already created and removed Working as Intended The behavior described is the intended behavior; this is not a bug labels Jun 6, 2017
@CzBuCHi
Copy link
Author

CzBuCHi commented Jun 7, 2017

@RyanCavanaugh sorry about that - i missed that comment ...

@CzBuCHi CzBuCHi closed this as completed Jun 7, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants