Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type definitions and intellisense #13

Open
neefrehman opened this issue Jun 27, 2020 · 8 comments
Open

Type definitions and intellisense #13

neefrehman opened this issue Jun 27, 2020 · 8 comments

Comments

@neefrehman
Copy link

Hi @mattdesl, I've just been watching your Introduction to creative coding class on Frontend Masters, and noticed that when you're using this library your editor is giving you autocomplete and type annotations (pictured below). I've been looking around and can't see any type definitions in the library, is there a different way that you're getting these?

image

@awaer
Copy link

awaer commented Jun 27, 2020

I believe these are generated by Visual Studio Code.

https://code.visualstudio.com/docs/editor/intellisense

@neefrehman
Copy link
Author

@awaer yes they should be generated by the editor, but usually this is only possible if the library emits a .d.ts file, which I don't think canvas-sketch-util does. I'm using VSCode but can't see any of the definitions. Have you had luck getting them to show?

@mattdesl
Copy link
Owner

mattdesl commented Jul 2, 2020

I'm definitely 👍 on Typescript definitions. It's not really an area I'm familiar with, but open to PRs and more discussion.

@smhutch
Copy link

smhutch commented Feb 11, 2021

@mattdesl I have been using these utils quite extensively in my own projects, and have made a start on adding types to my personal site. I would be happy to help out with adding types to this repo.

@elesq
Copy link

elesq commented Jan 29, 2023

was this ever resolved ?

@bulkan
Copy link

bulkan commented Sep 19, 2023

@smhutch can you provide a PR with your typedefs?

@elesq
Copy link

elesq commented Feb 3, 2024

Did this ever get followed up on?

@babausias
Copy link

I found this package which has enabled intellisense in the IDE for me:
https://www.npmjs.com/package/canvas-sketch-util-types

I added it manually to the dev dependencies to the package.json:

"devDependencies": {
    "@types/canvas-sketch-util": "npm:canvas-sketch-util-types"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants