mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
10 lines
318 B
TypeScript
10 lines
318 B
TypeScript
interface Example {
|
|
a: number;
|
|
b: number;
|
|
}
|
|
luajson.format({ a: 1, b: 2 }); // $ExpectType string
|
|
luajson.parse('return { a = 1, b = 2 }'); // $ExpectType object
|
|
luajson.parse('return { a = 1, b = 2 }') as Example; // $ExpectType Example
|
|
// @ts-expect-error
|
|
luajson.parse('return { a = 1, b = 2 }') as number;
|