-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from chadrien/master
Add some basic TypeScript typings
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
declare module 'css-ns' { | ||
interface Options { | ||
namespace: string; | ||
prefix?: string; | ||
include?: RegExp; | ||
exclude?: RegExp; | ||
self?: RegExp; | ||
glue?: string; | ||
React?: any; | ||
} | ||
|
||
type ClassMap = { [className: string]: boolean }; | ||
type ReactElement = any; | ||
|
||
export interface NsFunction { | ||
(classNames: string | any[] | ClassMap): string; | ||
<T extends ReactElement>(reactElement: T): T; | ||
} | ||
|
||
export const createCssNs: (options: Options | string) => NsFunction; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,6 @@ | |
"deploy-gh-pages": "git stash && npm run test-build && cp -r test temp && git checkout gh-pages && mv temp/* . && rm -rf temp && git commit -am 'Automatic gh-pages deploy' && git push origin gh-pages && git checkout -" | ||
}, | ||
"author": "Jarno Rantanen <[email protected]>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"types": "./index.d.ts" | ||
} |