I was getting tsc errors when building a project with a call to Resources.SpotlightSearch.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(72,16): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(73,18): error TS2322: Type '{ isSystemObject: false; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'isSystemObject' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(75,22): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(100,16): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(101,18): error TS2322: Type '{ isSystemObject: false; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'isSystemObject' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(103,22): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(571,18): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(572,20): error TS2322: Type '{ isSystemObject: false; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'isSystemObject' does not exist in type 'JSON'.
DeviceConnectionStats/src/TF_GSS_DeviceConnectionStatus_Monitor_Thing.ts(575,11): error TS2322: Type '{ items: string[]; }' is not assignable to type 'JSON'.
Object literal may only specify known properties, and 'items' does not exist in type 'JSON'.
I noticed the JSON type was defined in core TS libs and it looked like it was the interface for the global JSONobject.
I was getting tsc errors when building a project with a call to
Resources.SpotlightSearch
.I noticed the
JSON
type was defined in core TS libs and it looked like it was the interface for the globalJSON
object.When I changed
JSON
toTWJSON
, all of the errors went away and the extensions was loaded just fine by ThingWorx.