1

I'm trying to install typings(version 1.3.2 atm) for malihu-custom-scrollbar-plugin(typings). I'm using the following command:

typings install dt~mcustomscrollbar --save --global

This installs typings which later on are identified as wrong(error TS1110: Type expected.) because of the use of string literal types syntax like: axis?: "x"|"y"|"xy".

I checked the DT repo and I saw that in the types-2.0 branch the typings are not using this syntax and I am wondering and trying to find a way to get those installed, instead of the ones that comes by default.

Is there any way to achieve that? At least a way better than manually fixing the problem in the index.d.ts file.

P.S. I fooled arround with typings install <location> options but I couldn't manage to get it right and couldn't find any good documentation how it should be used.

1 Answers1

1

You can install typings directly from github and also specify required commit:

typings install github:DefinitelyTyped/DefinitelyTyped/mCustomScrollbar/mCustomScrollbar.d.ts#41f8573534b0fff88707d0a4cb870456b50cd43b --save --global

Where 41f8573534b0fff88707d0a4cb870456b50cd43b is commit.

Aleksey L.
  • 35,047
  • 10
  • 74
  • 84
  • Thank you!!! This was the command syntax I was looking for. Changed that to `typings install mCustomScrollbar=github:DefinitelyTyped/DefinitelyTyped/mCustomScrollbar/index.d.ts#50387d40462301d54cda62e24d3b2ee46540f24a --save --global` because I needed another branch and a custom name. – Velizar Velizarov Jul 25 '16 at 12:14