diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2018-10-15 07:29:50 +1100 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-14 17:38:23 -0400 |
commit | 10a97679ac80b4304c75d33cbc59c5736d11deb1 (patch) | |
tree | b51b9183ed251f61373069e5c4d35e39603bedb2 /js/util.ts | |
parent | 1840a1971317f5b8fc6e322b3a414b7f8a593c88 (diff) |
Align JSDoc to style guide.
Diffstat (limited to 'js/util.ts')
-rw-r--r-- | js/util.ts | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/js/util.ts b/js/util.ts index de6a078bb..0c50acebb 100644 --- a/js/util.ts +++ b/js/util.ts @@ -8,8 +8,7 @@ export function setLogDebug(debug: boolean): void { logDebug = debug; } -/** - * Debug logging for deno. +/** Debug logging for deno. * Enable with the `--log-debug` or `-D` command line flag. * @internal */ @@ -38,20 +37,22 @@ export function arrayToStr(ui8: Uint8Array): string { return String.fromCharCode(...ui8); } -/** - * A `Resolvable` is a Promise with the `reject` and `resolve` functions +/** A `Resolvable` is a Promise with the `reject` and `resolve` functions * placed as methods on the promise object itself. It allows you to do: * - * const p = createResolvable<number>(); - * ... - * p.resolve(42); + * const p = createResolvable<number>(); + * // ... + * p.resolve(42); * - * It'd be prettier to make Resolvable a class that inherits from Promise, + * It'd be prettier to make `Resolvable` a class that inherits from `Promise`, * rather than an interface. This is possible in ES2016, however typescript * produces broken code when targeting ES5 code. - * See https://github.com/Microsoft/TypeScript/issues/15202 - * At the time of writing, the github issue is closed but the problem remains. * + * At the time of writing, the GitHub issue is closed in favour of a proposed + * solution that is awaiting feedback. + * + * @see https://github.com/Microsoft/TypeScript/issues/15202 + * @see https://github.com/Microsoft/TypeScript/issues/15397 * @internal */ @@ -109,11 +110,8 @@ export interface Deferred { reject: Function; } -/** - * Create a wrapper around a promise that could be - * resolved externally. - * @internal - */ +/** Create a wrapper around a promise that could be resolved externally. */ +// @internal export function deferred(): Deferred { let resolve: Function | undefined; let reject: Function | undefined; |