Player.js: Add type definitions for typescript

Created on 24 Jan 2017  路  7Comments  路  Source: vimeo/player.js

angular-cli:

After npm install @vimeo/player, import fails with 'Cannot find module '@vimeo/player'.

I tried:

import Player from '@vimeo/player'
import Player from '@vimeo/player/dist/player'
import * as Player from '@vimeo/player'

enhancement help wanted

Most helpful comment

Types are now available via @types

DefinitelyTyped/DefinitelyTyped@a209273

Till Typescript 2.3.1 (which will support resolution of scopped packages) is out you have to install it via npm install @types/vimeo__player.

All 7 comments

Sounds like this might be an issue with angular-cli not being able to resolve scoped packages. Probably best to file an issue on angular-cli.

angular-cli wants typings

I installed @typings/vimeo but that didn't work either

So it sounds like you鈥檙e using typescript? Happy to accept a pull request that adds whatever metadata is needed for that.

Also looks like you can request that they add definitions for this library to https://github.com/DefinitelyTyped/DefinitelyTyped.

Hi @bdougherty, I've created the typings for @vimeo/player following your README.md file. I've created a pull request at DefinitelyTyped >> https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15593

I don't know how to implement it in the API itself, but maybe somebody else could take it from here?

Types are now available via @types

DefinitelyTyped/DefinitelyTyped@a209273

Till Typescript 2.3.1 (which will support resolution of scopped packages) is out you have to install it via npm install @types/vimeo__player.

Would be nice if this were re-opened and the types included directly in the project.

TypeScript is now arguably as mainstream as we can get, and this would definately provide a level of confidence that Vimeo was "onto it" if the player client libs "just worked" with types!

Love you guys!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jswebrjl picture jswebrjl  路  5Comments

Shigeki1120 picture Shigeki1120  路  3Comments

rassemdev picture rassemdev  路  7Comments

Peripona picture Peripona  路  8Comments

pepawel picture pepawel  路  4Comments