failjs

package
v0.0.0-...-41cedfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package failjs is equal api to syscall/js but is panic on all method invocation.

The usage is to get a tab complession to work inside an IDE (e.g. Visual Studio Code) without changing to GOOS to js

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Value
}

func (Error) Error

func (e Error) Error() string

type Func

type Func struct {
	Value
}

func FuncOf

func FuncOf(fn func(this Value, args []Value) interface{}) Func

func (Func) Release

func (c Func) Release()

type Type

type Type int
const (
	TypeUndefined Type = iota
	TypeNull
	TypeBoolean
	TypeNumber
	TypeString
	TypeSymbol
	TypeObject
	TypeFunction
)

func (Type) String

func (t Type) String() string

type TypedArray

type TypedArray struct {
	Value
}

func TypedArrayOf

func TypedArrayOf(slice interface{}) TypedArray

func (TypedArray) Release

func (a TypedArray) Release()

type Value

type Value struct {
}

func Global

func Global() Value

func Null

func Null() Value

func Undefined

func Undefined() Value

func ValueOf

func ValueOf(x interface{}) Value

func (Value) Bool

func (v Value) Bool() bool

func (Value) Call

func (v Value) Call(m string, args ...interface{}) Value

func (Value) Float

func (v Value) Float() float64

func (Value) Get

func (v Value) Get(p string) Value

func (Value) Index

func (v Value) Index(i int) Value

func (Value) InstanceOf

func (v Value) InstanceOf(t Value) bool

func (Value) Int

func (v Value) Int() int

func (Value) Invoke

func (v Value) Invoke(args ...interface{}) Value

func (Value) JSValue

func (v Value) JSValue() Value

func (Value) Length

func (v Value) Length() int

func (Value) New

func (v Value) New(args ...interface{}) Value

func (Value) Set

func (v Value) Set(p string, x interface{})

func (Value) SetIndex

func (v Value) SetIndex(i int, x interface{})

func (Value) String

func (v Value) String() string

func (Value) Truthy

func (v Value) Truthy() bool

func (Value) Type

func (v Value) Type() Type

type ValueError

type ValueError struct {
	Method string
	Type   Type
}

func (*ValueError) Error

func (e *ValueError) Error() string

type Wrapper

type Wrapper interface {
	JSValue() Value
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL