GithubHelp home page GithubHelp logo

Comments (6)

chpspiir avatar chpspiir commented on May 28, 2024

I see that I should probably have used this to import Clubhouse:
import * as Clubhouse from 'clubhouse-lib';

Maybe a Typescript example would fix that confusion. I'll see if I can't extend the README to include this.

from shortcut-client-js.

eliperkins avatar eliperkins commented on May 28, 2024

Ooh, nice find @chpspiir. Admittedly, we don't use this library from TypeScript here at Clubhouse, so we haven't run into this yet.

The create method is defined here: https://github.com/clubhouse/clubhouse-lib/blob/540abbfe82cc5d06caae9b73468a455cee72572d/typings/index.d.ts#L46, however, I'm not super clear on how type definitions for modules works.

I'd love for this to be clearer for future TypeScript users, either by updating the README or improving the type definition!

from shortcut-client-js.

chpspiir avatar chpspiir commented on May 28, 2024

The above fix that I posted ended up not working anyway. So the issue still stands πŸ€”

I am at the same place as you with regards to the type definitions. I tried looking, but I kinda gave up when I found a work-around.

from shortcut-client-js.

eliperkins avatar eliperkins commented on May 28, 2024

It looks like @j-martin is successfully using Clubhouse.create in their TypeScript project: https://github.com/andjosh/clubhouse-cli/blob/d63af74a6129c5cbf306c5cf15cfbc490bb1bc56/src/lib/client.ts#L1-L12

@chpspiir would you mind putting together a repro case for this, hopefully as a failing test in a PR to this project, so that we can address it for you?

from shortcut-client-js.

chpspiir avatar chpspiir commented on May 28, 2024

Sorry, it does indeed work. Sorry about the confusion πŸ˜“

from shortcut-client-js.

eliperkins avatar eliperkins commented on May 28, 2024

No worries! Happy to have folks using the library. Feel free to reach out or open other issues if you have more questions.

from shortcut-client-js.

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.