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

Add Typescript declarations #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zapp-brannigan-dota
Copy link

No description provided.

@rossengeorgiev
Copy link
Owner

Hi, could you provide context for the proposed changes? What they are? What they are for? How they are used? etc

@zapp-brannigan-dota
Copy link
Author

Hi, TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

The index.d.ts file contains declarations for the index.js file. When used in a TypeScript project these declarations enable things like type checking and autocomplete.

@p0358
Copy link

p0358 commented Nov 16, 2019

imo it should be more of something like this:

declare module 'simple-vdf' {
    export function parse(text: string): object;
    export function stringify(obj: object, pretty?: boolean): string;
    export function dump(obj: object, pretty?: boolean): string;
}

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

Successfully merging this pull request may close these issues.

None yet

3 participants