Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Check whether an existing named type is available to apply #38

Open
MadaraUchiha opened this issue Mar 21, 2018 · 1 comment
Open

Check whether an existing named type is available to apply #38

MadaraUchiha opened this issue Mar 21, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MadaraUchiha
Copy link
Contributor

Given file

type T0 = {foo: string, bar: boolean};

function magic(param) {
  return param;
}

magic({foo: 'hello world', bar: true});

We would like to use T0 as the type, because it's available and it matches our runtime type.

Actual:

//snip
function magic(param: Object) { // or at best {foo: string, bar: boolean} 
// snip

Expected:

// snip
function magic(param: T0) {
// snip

#goodnessSquad

@urish urish added enhancement New feature or request help wanted Extra attention is needed labels Mar 23, 2018
@urish
Copy link
Collaborator

urish commented Mar 23, 2018

That'd be awesome!

@urish urish added this to the Post 1.0.0 milestone Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants