Skip to main content

DuckTypeUtils

Utility method to check interface is equivalent for two implementations

Functions

isImplementation

DuckTypeUtils.isImplementation(
templatetable,
targetany
) → boolean

Returns true if a template is similar to a target

Show raw api
{
    "functions": [
        {
            "name": "isImplementation",
            "desc": "Returns true if a template is similar to a target",
            "params": [
                {
                    "name": "template",
                    "desc": "",
                    "lua_type": "table"
                },
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "any"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 18,
                "path": "src/ducktype/src/Shared/DuckTypeUtils.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "DuckTypeUtils",
    "desc": "Utility method to check interface is equivalent for two implementations",
    "source": {
        "line": 6,
        "path": "src/ducktype/src/Shared/DuckTypeUtils.lua"
    }
}