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

Allow circular references in type aliases #8408

Closed
ghost opened this issue May 1, 2016 · 2 comments
Closed

Allow circular references in type aliases #8408

ghost opened this issue May 1, 2016 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@ghost
Copy link

ghost commented May 1, 2016

Building on a question I asked on StackOverlow, I was wondering if it would be a nice addition if it would be possible to define types recursively. If I am guessing correctly this wouldn't be too difficult to implement.

Example:

type Document = [number | string | Array<Document>]

Currently, according to the spec, only classes and interfaces are allowed to reference themselves. Is there a reason for this?

Classes and interfaces can reference themselves in their internal structure...

@malibuzios
Copy link

Here are two related issues: #3496, #6230

@mhegazy
Copy link
Contributor

mhegazy commented May 1, 2016

As @malibuzios noted, looks like a duplicate of #6230

@mhegazy mhegazy closed this as completed May 1, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label May 1, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 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