mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
14 lines
215 B
TypeScript
14 lines
215 B
TypeScript
/// <reference path="once.d.ts" />
|
|
|
|
import once from "once";
|
|
|
|
once(() => 3);
|
|
once(() => 3)();
|
|
let s = once(() => ({foo: 1}))();
|
|
s.foo;
|
|
|
|
once.proto();
|
|
|
|
once(() => 3).called && true;
|
|
once(() => ({foo: 1})).value.foo;
|