Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
remove extraneous generics from Rune.str
Browse files Browse the repository at this point in the history
  • Loading branch information
tjjfvi committed Feb 16, 2023
1 parent 1d75410 commit d6b7923
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rune/Rune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ export class Rune<out T, out U = never> {
return value instanceof Rune ? value.into(ValueRune) : Rune.constant(value)
}

static str<X, T extends TemplateStringsArray, R extends unknown[]>(
...args: RunicArgs<X, [T, ...R]>
) {
static str<X>(strings: TemplateStringsArray, ..._values: RunicArgs<X, unknown[]>) {
const values = RunicArgs.resolve(_values)
return Rune
.tuple(args)
.map(([strings, ...values]) =>
.tuple(values)
.map((values) =>
strings
.map((templateString, i) => {
return i < values.length ? `${templateString}${values[i]}` : templateString
Expand Down

0 comments on commit d6b7923

Please sign in to comment.