Skip to content

Commit

Permalink
Merge pull request #6 from BytewaveMLP/master
Browse files Browse the repository at this point in the history
Add proper TypeScript definitions
  • Loading branch information
lukewhitehouse authored Dec 7, 2019
2 parents 9b1222b + c35bda1 commit c39b1c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
5 changes: 0 additions & 5 deletions assortment__darkmodejs.d.ts

This file was deleted.

18 changes: 18 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
declare enum Theme {
DARK = 'dark',
LIGHT = 'light',
NO_PREF = 'no-preference',
NO_SUPP = 'no-support'
}

interface Config {
onChange: (activeTheme: Theme, themes: typeof Theme) => void;
}

interface DarkModeJS {
removeListeners: () => void;
}

declare function darkmodejs(config: Config): DarkModeJS;

export = darkmodejs;

0 comments on commit c39b1c7

Please sign in to comment.