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

Private types export check gets thrown off by mutually recursive types that are exported separately #14753

Closed
rkirov opened this issue Mar 20, 2017 · 1 comment
Assignees
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fixed A PR has been merged for this issue

Comments

@rkirov
Copy link
Contributor

rkirov commented Mar 20, 2017

TypeScript Version: 2.2.1
Code

interface A {
  b: B
}

interface B {
  a: A
}
export {A, B}

Expected behavior:
No errors, all interfaces are exported.

Actual behavior:
f.ts(7,6): error TS4033: Property 'b' of exported interface has or is using private name 'B'.

@rkirov rkirov changed the title Private types export check gets thrown off by double-recursive types that are exported separately Private types export check gets thrown off by mutually recursive types that are exported separately Mar 20, 2017
@rkirov
Copy link
Contributor Author

rkirov commented Mar 20, 2017

Note simply doing export interface A and export interface B does not trigger this error.

@mhegazy mhegazy added the Bug A bug in TypeScript label Apr 19, 2017
@mhegazy mhegazy self-assigned this Apr 19, 2017
@mhegazy mhegazy added this to the TypeScript 2.4 milestone Apr 19, 2017
@mhegazy mhegazy added the Domain: Declaration Emit The issue relates to the emission of d.ts files label Aug 31, 2017
@mhegazy mhegazy assigned weswigham and unassigned mhegazy Aug 31, 2017
@mhegazy mhegazy modified the milestones: TypeScript 2.6, TypeScript 2.7 Oct 9, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Nov 21, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Domain: Declaration Emit The issue relates to the emission of d.ts files Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

4 participants