Skip to content

Commit

Permalink
feat(types): add Join
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed May 25, 2021
1 parent 215e603 commit 88374fd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type { DeepRequired } from './types/DeepRequired'
export type { EmptyValue } from './types/EmptyValue'
export type { FIXME } from './types/FIXME'
export type { IndexSignature } from './types/IndexSignature'
export type { Join } from './types/Join'
export type {
JSONArray,
JSONObject,
Expand Down
19 changes: 19 additions & 0 deletions src/types/Join.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { IndexSignature } from './IndexSignature'

/**
* @file Types - Join
* @module types/Join
*/

/**
* Constructs a string array by concatenating string `S` and `S1`.
*
* @template S - String to split
* @template S2 - String delimiter
* @template D - String delimiter
*/
export type Join<
S extends IndexSignature,
S1 extends IndexSignature,
D extends string = ''
> = `${S & string}${D}${S1 & string}`

0 comments on commit 88374fd

Please sign in to comment.