Giter Club home page Giter Club logo

Comments (4)

gtarsia avatar gtarsia commented on September 4, 2024

Just a stranger:
You can get them from DefinitelyTyped using this tool:
https://github.com/typings/typings
Cheers.

from chatjs.

vkelman avatar vkelman commented on September 4, 2024

Visual Studio 2013 Package Manager Console:

PM> Install-Package jquery.TypeScript.DefinitelyTyped -Version 2.1.1
Installing 'jquery.TypeScript.DefinitelyTyped 2.1.1'.
Successfully installed 'jquery.TypeScript.DefinitelyTyped 2.1.1'.
Adding 'jquery.TypeScript.DefinitelyTyped 2.1.1' to chatjs.
Successfully added 'jquery.TypeScript.DefinitelyTyped 2.1.1' to chatjs.

PM> Install-Package signalr.TypeScript.DefinitelyTyped
Attempting to resolve dependency 'jquery.TypeScript.DefinitelyTyped '.
Installing 'signalr.TypeScript.DefinitelyTyped 0.4.1'.
Successfully installed 'signalr.TypeScript.DefinitelyTyped 0.4.1'.
Adding 'signalr.TypeScript.DefinitelyTyped 0.4.1' to chatjs.
Successfully added 'signalr.TypeScript.DefinitelyTyped 0.4.1' to chatjs.

Now jQuery compilation errors disappeared, but there are still multiple SignalR related errors
There are bunch of errors of type:

Build: Duplicate identifier 'hub'
Build: Duplicate identifier 'hubConnection'
Build: Duplicate identifier 'signalR

There are also errors like

Build: Supplied parameters do not match signature of call target  jquery.chatjs.controller.ts 85
Build: Cannot find name 'chatJs'                                                      jquery.chatjs.controller.ts 111
Build: Cannot find name 'YatServerAdapter'                                   jquery.chatjs.messageboards.ts 56

Maybe 'signalr.TypeScript.DefinitelyTyped 0.4.1' is a wrong version (for SignalR 2.2.1)? But there is no other typings package for signalR.

But other errors make me think that Chatjs typescript code is not synced with JavaScript code. @andrerpena, @rpaschoal?

from chatjs.

vkelman avatar vkelman commented on September 4, 2024

OK, I understood why there were "Duplicate identifier" errors: building a project for some reason generated two SignalR type definition files: signalr-1.0.d.ts (Type definitions for SignalR 1.0) and signalr.d.ts (Type definitions for SignalR 2.2.0). Excluding first file from a project solved "Duplicate identifier" issue. I hope that SignalR 2.2.1 I'm using has identical interfaces to 2.2.0.

from chatjs.

vkelman avatar vkelman commented on September 4, 2024

In chatjs\ChatJs\js\jquery.chatjs.controller.ts and chatjs\ChatJs\js\jquery.chatjs.messageboard.ts instead of
/// <reference path="../../Scripts/Typings/autosize/autosize.d.ts"/>
there should be
/// <reference path="../../Scripts/Typings/jquery.autosize/jquery.autosize.d.ts"/>
because that's where NuGet installs autosize typings.

from chatjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.