Keystone-classic: Please publish typescript typings to aid in type checking and code completion

Created on 14 Apr 2017  Â·  10Comments  Â·  Source: keystonejs/keystone-classic

Its very cumbersome to switch between documentation and code to figure out what params are accepted by what object. Using typings with docstrings can give help where you need it and make development a lot faster.

feature request

Most helpful comment

with help of typing provided by @webteckie I have converted generator-keystone to typescript based, check out gautamsi/generator-keystone-ts

All 10 comments

@nojvek I am in the process of writing types for keystone 4.0.0. Will submit a pull request when done!

That is awesome!

On Sun, Apr 23, 2017 at 6:15 AM Jakub Kowalczyk notifications@github.com
wrote:

@nojvek https://github.com/nojvek I am in the process of writing types
for keystone 4.0.0. Will submit a pull request when done!

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/keystonejs/keystone/issues/4219#issuecomment-296442526,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA-JVL7RpE6sI5F0d-wnWfCT7dEoqJoiks5ry07qgaJpZM4M916R
.

I also had an effort going as part of my app to create a keystone Typescript declaration file. But I haven't done anything with it for a while due to other life priorities. But it was almost there, if I remember correctly.

@webteckie Would you be able to share it? I too seem to have most of the core functionality declared (testing it on a project in development, works brilliant so far), but it would be helpful to have a look whether I missed something. Cheers.

@jakow I will try to put it out there my tonite. Will update with link after I do. But note, I'll just take whatever and in whatever shape it is on as I can't remember what I was doing with it last :=)

@jakow have at it: https://github.com/webteckie/keystonejs-ts

Again, that is what I have as the latest in my system. I have not played with this in a few months thus not sure if things have changed or otherwise the state I left this on. I should be back on it soon. But please let me know what you come up with :-) Thanks!

@jakow @webteckie any help needed with typings? im really looking forward to have them in keystone.

Also, I was trying with importing current typings from @webteckie 's third-party repo and I would appreciate for some help though. I was trying to set up keystone-js.d.ts module definition file for intellisence in VSCode IDE.
I managed to do the following.

I've installed typings:
npm install typings --global

Then I imported @webteckie 's keystonejs-ts module definition.

typings install keystone=github:webteckie/keystonejs-ts/keystonejs.d.ts#f10e688c41c8e9477d10d5cf68ee4791fcc04673 --save --global

And tried to include it into js file:
/// <reference path="../typings/globals/keystone/index.d.ts" />

But no luck :worried:

@rimmer sorry I've been out of it for a while. To answer your question I would have to try it out. If I get some time I will. But I'm traveling and very busy. Not sure if @jakow has done anything with it either.

with help of typing provided by @webteckie I have converted generator-keystone to typescript based, check out gautamsi/generator-keystone-ts

Hey, @stennie is this "officially" in the pipeline anytime soon? thanks for your help

Was this page helpful?
0 / 5 - 0 ratings