Skip to content

Result

Result<T> = { component: string; data: T; echo?: any; error?: NGError; success: boolean; }

Defined in: newgrounds.d.ts:94

Contains information returned by an API component.

Type Parameter
T extends object
Property Type Description Defined in
component string The name of the component that was executed (ie ‘Medal.unlock’). newgrounds.d.ts:96
data T An object, or array of one-or-more objects, containing any returned properties or errors. newgrounds.d.ts:98
echo? any If you passed an ‘echo’ value in your execute object, it will be echoed here. newgrounds.d.ts:100
error? NGError This will contain any error info if the success property is false. newgrounds.d.ts:102
success boolean If false, there was a problem with your ‘request’ object. Details will be in the error property. newgrounds.d.ts:104