Skip to content

Change "object" to "Object" in index.d.ts#16271

Closed
jbeard4 wants to merge 1 commit intoDefinitelyTyped:masterfrom
jbeard4:patch-1
Closed

Change "object" to "Object" in index.d.ts#16271
jbeard4 wants to merge 1 commit intoDefinitelyTyped:masterfrom
jbeard4:patch-1

Conversation

@jbeard4
Copy link
Copy Markdown

@jbeard4 jbeard4 commented May 2, 2017

"object" is now a keyword in Typescript. In Typescript 2.1, this throws an error "Cannot find name 'object'." This change resolves the error.

Please fill in this template.

  • [ y ] Use a meaningful title for the pull request. Include the name of the package modified.
  • [ y ] Test the change in your own code. (Compile and run.)
  • [ y ] Follow the advice from the readme.
  • [ y ] Avoid common mistakes.
  • [ y ] Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

"object" is now a keyword in Typescript. In Typescript 2.1, this throws an error "Cannot find name 'object'." This change resolves the error.
@dt-bot
Copy link
Copy Markdown
Member

dt-bot commented May 2, 2017

types/es6-shim/index.d.ts

to author (@rbuckton). Could you review this PR?
👍 or 👎?

Checklist

  • pass the Travis CI test?

@ghost
Copy link
Copy Markdown

ghost commented May 2, 2017

We should probably stop trying to duplicate lib.es6.d.ts typings in this package, so you can just use the typings from whatever TypeScript version you have. CC @rbuckton

Copy link
Copy Markdown
Contributor

@mhegazy mhegazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the correct change. this will break TS 2.2 users.

@mhegazy
Copy link
Copy Markdown
Contributor

mhegazy commented May 3, 2017

I wounder if we just should deprecate this package all together.

@mhegazy mhegazy added the Revision needed This PR needs code changes before it can be merged. label May 3, 2017
@rbuckton
Copy link
Copy Markdown
Collaborator

rbuckton commented Jun 1, 2017

Once we get microsoft/TypeScript#15780 merged, we can look into andy's comment. I recommend that we don't take this change.

@rbuckton rbuckton closed this Jun 1, 2017
@rbuckton
Copy link
Copy Markdown
Collaborator

rbuckton commented Jun 1, 2017

@jbeard4 If you still require TypeScript 2.1 support you can use npm install @types/es6-shim@ts2.1 --save-exact to install (and lock in) the version of es6-shim prior to the introduction of object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Revision needed This PR needs code changes before it can be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants