Skip to content

Instantly share code, notes, and snippets.

@lightningspirit
Created September 14, 2020 21:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightningspirit/35b1e0898de660af65c53a58f6c54563 to your computer and use it in GitHub Desktop.
Save lightningspirit/35b1e0898de660af65c53a58f6c54563 to your computer and use it in GitHub Desktop.
Typescript typings for react-lorem-ipsum
declare module "react-lorem-ipsum" {
import React from "react"
interface AvatarProps {
gender?: "all" | "male" | "female"
className?: string
width?: number
height?: number
alt?: string
}
interface LoremIpsumProps {
p?: number
avgWordsPerSentence?: number
avgSentencesPerParagraph?: number
startWithLoremIpsum?: boolean
}
export function loremIpsum(args: LoremIpsumProps): string
export function name(gender: "male" | "female" | "all"): string
export function surname(): string
export function username(): string
export class Avatar extends React.Component<AvatarProps> {}
export class LoremIpsum extends React.Component<LoremIpsumProps> {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment