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

remove redundant typings when using interfaces #170

Open
alexrudd2 opened this issue Feb 18, 2025 · 0 comments
Open

remove redundant typings when using interfaces #170

alexrudd2 opened this issue Feb 18, 2025 · 0 comments

Comments

@alexrudd2
Copy link
Owner

One thing that'd be nice to look at is unnecessary typings, but I don't know if those tools have rules for that. For example in server.ts we define an interface for the Plotter object here:

saxi/src/server.ts

Lines 158 to 163 in d05fc4c

interface Plotter {
prePlot: (initialPenHeight: number) => Promise<void>;
executeMotion: (m: Motion, progress: [number, number]) => Promise<void>;
postCancel: (initialPenHeight: number) => Promise<void>;
postPlot: () => Promise<void>;
}

But the functions below still have their typings :

async postCancel(initialPenHeight: number): Promise<void> {

which hurts the readability in my opinion.

Originally posted by @drskullster in #168 (comment)

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

1 participant