File

lib/common/src/scheduled-notifications/scheduled-notification.commons.ts

Index

Properties

Indexable

[index: string]:

Properties

data
data: Record<string | string | number | boolean>
Type : Record<string | string | number | boolean>
Optional
timestamp
timestamp: number
Type : number
import	{
			assert,
			assertProperty,
			isErrorFree
		}										from '@rcc/core'

export interface ScheduledNotification {
	[index:string]:		unknown
	timestamp:			number
	data?:				Record<string, string|number|boolean>
}


export function assertScheduledNotification(x:unknown): asserts x is ScheduledNotification {
	assertProperty(x, 'timestamp')
	assert(typeof x.timestamp == 'number', ".timestamp is not a number")
}

export function isScheduledNotification(x:unknown): x is ScheduledNotification {
	return isErrorFree( () => assertScheduledNotification(x) )
}


results matching ""

    No results matching ""