JSValue.GetValueExternalOrPrimitive method
Gets the .NET external value or primitive object value (string, boolean, or double) for a JS value, or null if the JS value is not convertible to one of those types.
C#
public object? GetValueExternalOrPrimitive()
Remarks
This is useful when marshalling where a JS value must be converted to some .NET type, but the target type is unknown (object).
See Also
- struct JSValue
- namespace Microsoft.JavaScript.NodeApi