MCPcopy
hub / github.com/gopherjs/gopherjs / IsJsObject

Function IsJsObject

compiler/typesutil/typesutil.go:12–19  ·  view source on GitHub ↗
(t types.Type)

Source from the content-addressed store, hash-verified

10}
11
12func IsJsObject(t types.Type) bool {
13 ptr, isPtr := t.(*types.Pointer)
14 if !isPtr {
15 return false
16 }
17 named, isNamed := ptr.Elem().(*types.Named)
18 return isNamed && IsJsPackage(named.Obj().Pkg()) && named.Obj().Name() == "Object"
19}
20
21// RecvType returns a named type of a method receiver, or nil if it's not a method.
22//

Callers 8

translateStmtMethod · 0.92
translateAssignMethod · 0.92
translateSelectionMethod · 0.92
externalizeMethod · 0.92
translateExprMethod · 0.92
internalizeMethod · 0.92
visitCallExprMethod · 0.92

Calls 5

IsJsPackageFunction · 0.85
PkgMethod · 0.80
ObjMethod · 0.65
ElemMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…