Skip to content

interface Type inference #20953

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
kgtkr opened this issue Jan 1, 2018 · 1 comment
Closed

interface Type inference #20953

kgtkr opened this issue Jan 1, 2018 · 1 comment
Labels
Duplicate An existing issue was already created

Comments

@kgtkr
Copy link

kgtkr commented Jan 1, 2018

TypeScript Version: 2.5.2
Code

interface ITest {
  f(x: number): string;
}

class Test implements ITest {
  f(x){
    
  }
}

Expected behavior:
x is number

Actual behavior:
x is any

@kgtkr kgtkr changed the title imterface Type inference interface Type inference Jan 1, 2018
@DanielRosenwasser DanielRosenwasser added the Duplicate An existing issue was already created label Jan 1, 2018
@DanielRosenwasser
Copy link
Member

Looks like a duplicate of #7011

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 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