You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{validateRawData}from'./rawData';import{ResourceTagList,ResourceTagMap}from'./tagging';enumEntityClasses{DEVICE='Device',}exportinterfaceGraphObject{_key: string;_type: string;_class: string[];}exportinterfaceEntityextendsGraphObject{active: boolean;[k: string]:
|string|boolean|number|(string|boolean|number)[]|null|undefined;}exportinterfaceDeviceextendsEntity{deviceId: string|null;make?: string;}/** * A type representing entity data from a provider. */typeProviderSourceData={/** * Some providers include a collection of `tags` that will be stored on the * generated entity as `tag.propertyName`, `propertyName` when the tag is * registered in `tagProperties` or is known to be a common tag property name, * and the tag values will be collected in the generated entity as `tags` (a * `string[]`); */tags?: ResourceTagList|ResourceTagMap;[key: string]: any;};typeGeneratedEntity<TextendsEntity>=T&{_rawData: any};interfaceNewEntityDataInput<T>{entityData: {assign: T;source: ProviderSourceData;};}exportfunctioncreateIntegrationEntity<TextendsEntity>(input: NewEntityDataInput<T>,): GeneratedEntity<T>{constgeneratedEntity: GeneratedEntity<T>={
...input.entityData.assign,_rawData: input.entityData.source,};validateRawData(generatedEntity);returngeneratedEntity;}constd: Device={deviceId: null,active: false,_key: '',_type: '',_class: [],};constx=createIntegrationEntity<Device>({entityData: {assign: {_class: ['Device'],_key: 'a',_type: 'b',active: false,deviceId: 'ss',lol: 'x',},source: {},},});
No description provided.
The text was updated successfully, but these errors were encountered: