mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 21:40:43 +00:00
Update EmbeddedBuiltinDefinitions.cpp to use more string literals
Changes types for _VERSION, type and select to use more accurate string literals.
This commit is contained in:
parent
f80229c517
commit
b4c1e6ede0
1 changed files with 3 additions and 3 deletions
|
@ -102,13 +102,13 @@ declare function require(target: any): any
|
|||
declare function getfenv(target: any): { [string]: any }
|
||||
|
||||
declare _G: any
|
||||
declare _VERSION: string
|
||||
declare _VERSION: "Luau"
|
||||
|
||||
declare function gcinfo(): number
|
||||
|
||||
declare function print<T...>(...: T...)
|
||||
|
||||
declare function type<T>(value: T): string
|
||||
declare function type<T>(value: T): "nil" | "boolean" | "number" | "vector" | "string" | "table" | "function" | "userdata" | "thread"
|
||||
declare function typeof<T>(value: T): string
|
||||
|
||||
-- `assert` has a magic function attached that will give more detailed type information
|
||||
|
@ -135,7 +135,7 @@ declare function pcall<A..., R...>(f: (A...) -> R..., ...: A...): (boolean, R...
|
|||
declare function xpcall<E, A..., R1..., R2...>(f: (A...) -> R1..., err: (E) -> R2..., ...: A...): (boolean, R1...)
|
||||
|
||||
-- `select` has a magic function attached to provide more detailed type information
|
||||
declare function select<A...>(i: string | number, ...: A...): ...any
|
||||
declare function select<A...>(i: "#" | number, ...: A...): ...any
|
||||
|
||||
-- FIXME: This type is not entirely correct - `loadstring` returns a function or
|
||||
-- (nil, string).
|
||||
|
|
Loading…
Reference in a new issue