Skip to content

Commit 620974c

Browse files
authored
rename label to note (#220)
* label -> note * make note optional * add changeset
1 parent 78bcfe6 commit 620974c

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.changeset/itchy-eels-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vercel/flags-core": patch
3+
---
4+
5+
[internal] change label to note

packages/vercel-flags-core/src/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export namespace Original {
324324
export type List = {
325325
// backwards compatibility, we should only use "list" going forward
326326
type: 'list/inline' | 'list';
327-
items: { label: string; value: string | number }[];
327+
items: { note?: string; value: string | number }[];
328328
id?: never;
329329
};
330330

@@ -382,12 +382,12 @@ export namespace Original {
382382
*
383383
* @example
384384
* {
385-
* user: { id: { label: string; value: string }[] }
385+
* user: { id: { note?: string; value: string }[] }
386386
* }
387387
*/
388388
export type TargetList = Record<
389389
string,
390-
Record<string, { label: string; value: string }[]>
390+
Record<string, { note?: string; value: string }[]>
391391
>;
392392

393393
/**
@@ -401,7 +401,7 @@ export namespace Original {
401401
*
402402
* @example
403403
* include: {
404-
* user: { id: { label: string, value: string }[] }
404+
* user: { id: { note?: string, value: string }[] }
405405
* }
406406
*/
407407
include: TargetList;
@@ -410,7 +410,7 @@ export namespace Original {
410410
*
411411
* @example
412412
* exclude: {
413-
* user: { id: { label: string, value: string }[] }
413+
* user: { id: { note?: string, value: string }[] }
414414
* }
415415
*/
416416
exclude: TargetList;

0 commit comments

Comments
 (0)