Add typescript definitions
Closed this issue · 2 comments
joeyfigaro commented
I took a first pass at running everything here through tsc
and this was the result:
export function generateParticles({ count, height, margin, seed, width, }: {
count: any;
height: any;
margin?: number;
seed: any;
width: any;
}): {
x: number;
y: number;
vx: number;
vy: number;
line: any[];
}[];
export function moveParticle({ amplitude, damping, frequency, lengthOfStep, particle, }: {
amplitude: any;
damping: any;
frequency: any;
lengthOfStep: any;
particle: any;
}): void;
export function generateField({ amplitude, count, damping, height, margin, particles: suppliedParticles, scale, seed, width, }?: {
amplitude?: number;
count?: number;
damping?: number;
height: any;
margin?: number;
particles: any;
scale?: number;
seed: any;
width: any;
}): any;
Looks like the return type for generateField
is wrong–are you open to adding type defs to the distributed library?
joeyfigaro commented
@romellogoodman if you are open to having them added, I'd be happy to open a PR with config, types, and a naive pass at supporting scripts for your publishing process.
romellogoodman commented
Hey, so im not looking to add typescript to this project at the moment. Feel free to fork though!