* Patch from Henrique Werlang to add Delphi compatible From<>

This commit is contained in:
michael 2020-12-28 11:43:36 +00:00
parent 6b2457c67b
commit 219a749aa3

View File

@ -34,6 +34,7 @@ type
function GetIsEmpty: boolean;
function GetTypeKind: TTypeKind;
public
generic class function From<T>(const Value: T): TValue; static;
class function FromJSValue(v: JSValue): TValue; static;
property Kind: TTypeKind read GetTypeKind;
@ -502,6 +503,11 @@ begin
Result:=FTypeInfo.Kind;
end;
generic class function TValue.From<T>(const Value: T): TValue;
begin
Result := FromJSValue(Value);
end;
class function TValue.FromJSValue(v: JSValue): TValue;
var
i: NativeInt;