-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type declarations for TypeScript support.
- Loading branch information
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,38 @@ | ||
import * as React from "react"; | ||
import IfAllGrantedProps = ReactAuthorization.IfAllGrantedProps; | ||
import IfAnyGrantedProps = ReactAuthorization.IfAnyGrantedProps; | ||
import IfGrantedProps = ReactAuthorization.IfGrantedProps; | ||
import IfNoneGrantedProps = ReactAuthorization.IfNoneGrantedProps; | ||
|
||
export namespace ReactAuthorization { | ||
interface CommonProps { | ||
actual?: string | string[]; | ||
unauthorized?: React.ReactNode | null; | ||
} | ||
|
||
interface IfAllGrantedProps extends CommonProps { | ||
expected: string[]; | ||
} | ||
|
||
interface IfAnyGrantedProps extends CommonProps { | ||
expected: string[]; | ||
} | ||
|
||
interface IfGrantedProps extends CommonProps { | ||
expected: string; | ||
} | ||
|
||
interface IfNoneGrantedProps extends CommonProps { | ||
expected?: string | string[]; | ||
} | ||
} | ||
|
||
declare const IfAllGranted: React.FC<IfAllGrantedProps>; | ||
|
||
declare const IfAnyGranted: React.FC<IfAnyGrantedProps>; | ||
|
||
declare const IfGranted: React.FC<IfGrantedProps>; | ||
|
||
declare const IfNoneGranted: React.FC<IfNoneGrantedProps>; | ||
|
||
export {IfAllGranted, IfAnyGranted, IfGranted, IfNoneGranted}; |