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

Typescript support #37

Closed
dipu-bd opened this issue Jan 23, 2025 · 2 comments · Fixed by #38
Closed

Typescript support #37

dipu-bd opened this issue Jan 23, 2025 · 2 comments · Fixed by #38

Comments

@dipu-bd
Copy link
Contributor

dipu-bd commented Jan 23, 2025

It would be nice to have type definitions for this package

@dipu-bd
Copy link
Contributor Author

dipu-bd commented Jan 27, 2025

declare module "oconf" {
    interface OconfOptions {
        cwd?: string;

        /**
         * Use relaxed JSON format.
         */
        relaxed?: boolean;

        /**
         * Absolute path or glob pattern for ignoring included files.'
         */
        ignore?: string | string[];

        /**
         * Only values in #public objects will be extracted.
         */
        public?: boolean;
    }

    interface Oconf {
        load(rootFileName: string | string[], options?: OconfOptions): any;
    }

    const oconf: Oconf;
    export = oconf;
}

dipu-bd added a commit to dipu-bd/node-oconf that referenced this issue Jan 27, 2025
@dipu-bd
Copy link
Contributor Author

dipu-bd commented Jan 27, 2025

Created a PR: #38

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

Successfully merging a pull request may close this issue.

1 participant