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

strict function argument types #19432

Closed
ccorcos opened this issue Oct 23, 2017 · 3 comments
Closed

strict function argument types #19432

ccorcos opened this issue Oct 23, 2017 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@ccorcos
Copy link

ccorcos commented Oct 23, 2017

TypeScript Version: 2.5.3

Code

interface X {
	x: number
}

interface Y {
	x: number
	y: number
}


function f(x: Y) { }

const g : (x: X) => void = f

Expected behavior:

I would expect g to have an error because f can get called without the necessary y property...

Actual behavior:

...but there isnt.

@ahejlsberg
Copy link
Member

See #18654.

@ahejlsberg ahejlsberg added the Duplicate An existing issue was already created label Oct 24, 2017
@ccorcos
Copy link
Author

ccorcos commented Oct 24, 2017

awesome! thanks. is this coming out with 2.6 or 2.7?

@ccorcos ccorcos closed this as completed Oct 24, 2017
@ahejlsberg
Copy link
Member

@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