From 8bb94c34ea033841c715044ca4afe72ccf282d00 Mon Sep 17 00:00:00 2001 From: Junseo Yoo Date: Tue, 16 Jul 2024 17:18:12 -0700 Subject: [PATCH] added parameters to typelib.newmetatable --- docs/user-defined-type-functions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user-defined-type-functions.md b/docs/user-defined-type-functions.md index 7d1ae51..bbd16f3 100644 --- a/docs/user-defined-type-functions.md +++ b/docs/user-defined-type-functions.md @@ -102,8 +102,8 @@ All attributes of newly created typelib are initialized with empty tables / arra | `getbooleansingleton(arg: boolean)` | `typelib` | returns an immutable runtime representation of a boolean singleton type of the argument | | `getunion(arg: {typelib})` | `typelib` | returns an immutable runtime representation of union type of its argument | | `getintersection(arg: {typelib})` | `typelib` | returns an immutable runtime representation of intersection type of its argument | -| `newtable(props: {[typelib]: typelib}, indexer: {key: typelib, value: typelib}?)` | `typelib` | returns a mutable runtime representation of a `table` type | -| `newmetatable()` | `typelib` | returns a mutable runtime representation of a metatable represented as a special property of the `table` type | +| `newtable(props: {[typelib]: typelib}?, indexer: {key: typelib, value: typelib}?)` | `typelib` | returns a mutable runtime representation of a `table` type | +| `newmetatable(props: {[typelib]: typelib}?, indexer: {key: typelib, value: typelib}?, metatable: typelib?)` | `typelib` | returns a mutable runtime representation of a metatable. `metatable` argument needs to be the same type as `typelib.newtable()` | | `newfunction(parameters: {typelib} \| typelib?, returns: {typelib} \| typelib?)` | `typelib` | returns a mutable runtime representation of a `function` type. Calling `newfunction(X)` will by default set `parameters` to `X` | | `isnil(arg: typelib)` | `boolean` | returns true if the argument is syntactically a runtime representation of the built-in type `nil` | | `isunknown(arg: typelib)` | `boolean` | returns true if the argument is syntactically a runtime representation of the built-in type `unknown` |