Skip to content

Error messages report declared names rather than aliased names #16486

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
andrejsm opened this issue Jun 13, 2017 · 2 comments
Closed

Error messages report declared names rather than aliased names #16486

andrejsm opened this issue Jun 13, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@andrejsm
Copy link

TypeScript Version: 2.3.4

Code https://github.com/andrejsm/ts-type-alias

Expected behavior:
When an error occurs I expect to get a proper reference to aliased types:

file: 'file:///Users/andrejs.m/Sites/Typescript/type_alias/src/type-alias.ts'
severity: 'Error'
message: 'Type '{ list: { name: string; value: string; }[]; }' is not assignable to type 'ListProps'.
  Types of property 'list' are incompatible.
    Type '{ name: string; value: string; }[]' is not assignable to type 'ItemProps[]'.
      Type '{ name: string; value: string; }' is not assignable to type 'ItemProps'.
        Types of property 'value' are incompatible.
          Type 'string' is not assignable to type 'number'.'
at: '3,7'
source: 'ts'

Actual behavior:
Instead I get actual type names:

file: 'file:///Users/andrejs.m/Sites/Typescript/type_alias/src/type-alias.ts'
severity: 'Error'
message: 'Type '{ list: { name: string; value: string; }[]; }' is not assignable to type 'Props'.
  Types of property 'list' are incompatible.
    Type '{ name: string; value: string; }[]' is not assignable to type 'Props[]'.
      Type '{ name: string; value: string; }' is not assignable to type 'Props'.
        Types of property 'value' are incompatible.
          Type 'string' is not assignable to type 'number'.'
at: '3,7'
source: 'ts'
@andrejsm andrejsm changed the title Type loses alias name when error occures Imported type loses alias name when error occurs Jun 13, 2017
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jun 15, 2017
@DanielRosenwasser DanielRosenwasser changed the title Imported type loses alias name when error occurs Error messages report declared names rather than aliased names Jun 15, 2017
@mhegazy mhegazy removed the Bug A bug in TypeScript label Apr 12, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Apr 12, 2018

Duplicate of #13095

@mhegazy mhegazy marked this as a duplicate of #13095 Apr 12, 2018
@mhegazy mhegazy added the Duplicate An existing issue was already created label Apr 12, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

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

4 participants