Skip to content

Commit

Permalink
Improve typings for split types option (#26)
Browse files Browse the repository at this point in the history
Contributed by @StevenJPx2
  • Loading branch information
lukePeavey authored May 3, 2022
1 parent d9ca2fd commit adda9f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
declare module 'split-type' {
type TypesValue = 'lines' | 'words' | 'chars'
type TypesListString =
| TypesValue
| `${TypesValue}, ${TypesValue}`
| `${TypesValue}, ${TypesValue}, ${TypesValue}`

type SplitTypeOptions = {
absolute: boolean
tagName: string
lineClass: string
wordClass: string
charClass: string
splitClass: string
types: string
split: string
types: TypesListString | TypesValue[]
split: TypesListString | TypesValue[]
}

type TargetElement =
Expand Down

0 comments on commit adda9f4

Please sign in to comment.