Required Static Methodjavascriptkit 0.23.0JavaScriptKit

construct(from:)

Construct an instance of Self, if possible, from the given JSValue. Return nil if the value is not compatible with the conforming Swift type.

ConstructibleFromJSValue.swift:8
static func construct(from value: JSValue) -> Self?

Parameters

value

The JSValue to decode

Returns

An instance of Self, if one was successfully constructed from the value.