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

type parameters as constraints feature doesn't compile with --declaration argument #6040

Closed
zpdDG4gta8XKpMCd opened this issue Dec 10, 2015 · 1 comment

Comments

@zpdDG4gta8XKpMCd
Copy link

In the latest typeParametersAsConstraints branch the following:

// test.ts
export function append<a, b extends a>(result: a[], value: b): a[] {
    result.push(value);
    return result;
}

compiles with

node ./built/local/tsc.js --module commonjs test.ts 

but fails with

node ./built/local/tsc.js --module commonjs --declaration test.ts 

saying

test.ts(1,37): error TS4016: Type parameter 'b' of exported function has or is using private name 'a'
@ahejlsberg
Copy link
Member

Now fixed in #5949.

@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants