Giter VIP home page Giter VIP logo

paper.d.ts's People

Contributors

blayzen-w avatar clark-stevenson avatar dekimasoon avatar devdoomari avatar elektrowolle avatar sasensi avatar sqwk avatar stickerfiend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paper.d.ts's Issues

Merge into DefinitelyTyped

Would it be OK to merge these definitions into the DefinitelyTyped project, from where they might also be published to npm at @types/paper?

Where to go next?

Hey @StickerFiend

๐Ÿ‘

So I am not sure of the best way really.

Ideally I would be happy to transfer the whole thing to you so you can ditch me as the third wheel but I don't really know how to achieve that as not the best with Github.

You could also just copy the files from here, start your own Repo StickerFiend/paper.d.ts

Then I could put a big readme and a big dirty comment at the top of my version pointing them to your repo. This is what @natelong did a few years back https://github.com/natelong/pixi-ts-def when there was multiple competing declarations and this was before pixi typescript existed.

If you have experience of using these declarations successfully, maybe even paperjs would let you add a types to their package.json to ship it along with the library.

options options!

Angular2 and PaperJs

I included npm package paper by giving "npm install paper". The package got added.
I wants to draw a line using paperJS. How it will be done in typescript?

Incorect definition for paper.Path.Rectangle | Line | Circle...

Hi,

first of all, thank you for this definition that helps me starting a new project using typescript and paperjs.

Experimenting with it, I found that paper.Path.* static properties throw an error when trying to instantiate it as you would do with paperjs API.

new paper.Path(); // works as expected
new paper.Path.Rectangle(); // throws an error

I've searched ways to resolve it but I'm just starting with typescript and I didn't find any ways to use class static property as a constructor for another class.

Have you got an idea ?

Thank you.

style assignments reporting error when using 'any'

Thank you very much for providing those types.
Excellent work!

This came to my attention:

let simpleLine: paper.Path.Line = new paper.Path.Line(paper.view.center, paper.view.center.add([10,10]));
simpleLine.style = { strokeColor: 'hsla(207, 100%, 33%, 1)', strokeWidth: 4 }; // reported as error, but valid and working

simpleLine.style: paper.Style | any

I use this often because it saves a lot of typing and I find it more readable.

Reference: paperjs

Missing insertItems in PaperScope.settings

I've noticed that property insertItems: boolean is missing from settings object in PaperScope class. And another thing - shouldn't the Path.Rectangle's first constructor be defined like this:

constructor(rectangle: paper.Rectangle, radius?: number);

instead of this:

constructor(rectangle: Rectangle, radius?: number);

How do I import from it?

given

/// <reference path="./paper.d.ts"/>

any of

import {Path} from "paper"
import {Path} from paper
import {Path} from "./paper"

Will not work.
If I change paper.d.ts to

declare module "paper" {

(declaring with a string literal), then the first import syntax will work. However, there will be no paper object, so I'm not sure that's any good.

I guess another way of putting it would be.. How do I use it?

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.