Skip to content

Commit e4b3820

Browse files
committed
Add UriTemplate.toString
1 parent 1e040e9 commit e4b3820

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/shared/uriTemplate.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,22 @@ export class UriTemplate {
3030
);
3131
}
3232
}
33+
private readonly template: string;
3334
private readonly parts: Array<
3435
| string
3536
| { name: string; operator: string; names: string[]; exploded: boolean }
3637
>;
3738

3839
constructor(template: string) {
3940
UriTemplate.validateLength(template, MAX_TEMPLATE_LENGTH, "Template");
41+
this.template = template;
4042
this.parts = this.parse(template);
4143
}
4244

45+
toString(): string {
46+
return this.template;
47+
}
48+
4349
private parse(
4450
template: string,
4551
): Array<

0 commit comments

Comments
 (0)