fix(ui-approval): type pending approval discriminator
This commit is contained in:
1 parent
6cf7b1e34f
commit
4647dbf8ff
1 file changed
+2
-1
@@ -68,7 +68,7 @@ let nextApprovalKey = 0
|
||||
/** One answerable Client presentation of a pending Host waterfall. */
|
||||
export class PendingApproval {
|
||||
/** Domain discriminator used by Session pending-interaction consumers. */
|
||||
readonly kind = 'approval' as const
|
||||
readonly kind: 'approval'
|
||||
/** Opaque render identity and one-shot remount axis. */
|
||||
readonly key: string
|
||||
/** Tool requesting the decision. */
|
||||
@@ -92,6 +92,7 @@ export class PendingApproval {
|
||||
* @param request - Host approval request projected through the Remote Event.
|
||||
*/
|
||||
constructor(readonly sessionId: SessionId, request: ApprovalPresentationRequest) {
|
||||
this.kind = 'approval'
|
||||
nextApprovalKey += 1
|
||||
this.key = `approval:${String(nextApprovalKey)}`
|
||||
this.toolName = request.toolName
|
||||
|
||||
Reference in new issue
Block a user