-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add typescript typings #4
Comments
Hello! Any status on this? |
adamjarret
added a commit
to adamjarret/spinnies
that referenced
this issue
May 1, 2020
or use declare module "spinnies" {
type StopAllStatus = "succeed" | "fail" | "stopped";
type SpinnerStatus = StopAllStatus | "spinning" | "non-spinnable";
interface Spinner {
interval: number;
frames: string[];
}
interface SpinnerOptions {
text?: string;
indent?: number;
status?: SpinnerStatus;
color?: string;
succeedColor?: string;
failColor?: string;
}
interface Options {
color?: string;
succeedColor?: string;
failColor?: string;
spinnerColor?: string;
succeedPrefix?: string;
failPrefix?: string;
disableSpins?: boolean;
spinner?: Spinner;
}
export default class Spinnies {
static dots: Spinner;
static dashes: Spinner;
constructor(options?: Options);
add: (name: string, options?: SpinnerOptions) => SpinnerOptions;
pick: (name: string) => SpinnerOptions;
remove: (name: string) => SpinnerOptions;
update: (name: string, options?: SpinnerOptions) => SpinnerOptions;
succeed: (name: string, options?: SpinnerOptions) => SpinnerOptions;
fail: (name: string, options?: SpinnerOptions) => SpinnerOptions;
stopAll: (status?: StopAllStatus) => { [name: string]: SpinnerOptions };
hasActiveSpinners: () => boolean;
}
} |
I'm hoping to get types added to DefinitelyTyped over in DefinitelyTyped/DefinitelyTyped#59503. In the meantime, here is the slightly improved local type declarations file that I'm using in my project:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hi,
it would be great if we have typings so we get IntelliSense in IDE and stop typescript complaining.
The text was updated successfully, but these errors were encountered: