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

lib/lib.d.ts error Cannot find name 'object'. #14647

Closed
Skuriles opened this issue Mar 14, 2017 · 3 comments
Closed

lib/lib.d.ts error Cannot find name 'object'. #14647

Skuriles opened this issue Mar 14, 2017 · 3 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@Skuriles
Copy link

Skuriles commented Mar 14, 2017

TypeScript Version: 2.2.1

using gulp typescript with latest version 2.2.1 of typescript throws errors:

typescript/lib/lib.d.ts(163,15): error TS2304: Cannot find name 'object'.
typescript/lib/lib.d.ts(170,15): error TS2304: Cannot find name 'object'.

Expected behavior:
Compile without errors

Actual behavior:

typescript/lib/lib.d.ts(163,15): error TS2304: Cannot find name 'object'.
typescript/lib/lib.d.ts(170,15): error TS2304: Cannot find name 'object'.

-> renaming the lines to the following (just changed object to Object) solves the compile error

create(o: Object | null): any;

    /**
      * Creates an object that has the specified prototype, and that optionally contains specified properties.
      * @param o Object to use as a prototype. May be null
      * @param properties JavaScript object that contains one or more property descriptors.
      */
    create(o: Object | null, properties: PropertyDescriptorMap): any;
@ghost
Copy link

ghost commented Mar 14, 2017

object is a keyword in TS2.2. Is it possible you're compiling with a different version than the version you get lib from?

@mhegazy mhegazy added the Question An issue which isn't directly actionable in code label Mar 14, 2017
@Skuriles
Copy link
Author

I found some errors in my package,json (double entries in dev and "normal" dependencies) -> fixed it and re-installed all packages -> seems to work now.
Thanks for the hint

@DenisCarriere
Copy link

👍 Thanks @andy-ms

kevmcdonk added a commit to kevmcdonk/BotFramework-DirectLineJS that referenced this issue May 14, 2017
Using Typescript 2.3.2, hit the following error:
    Error - typescript - node_modules\botframework-directlinejs\built\directLine.d.ts(203,12): error TS2304: Cannot find name 'object'.

Found the [following issue](microsoft/TypeScript#14647) on the Typescript repo that suggested using uppercase O due to the object keyword in Typescript 2.2. Changing this certainly fixed in my scenario.
@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
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

3 participants