Skip to content

Commit 14bcd03

Browse files
committed
📝 use linkcode with [module].member style
1 parent 385077d commit 14bcd03

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

eval/stringify.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ import {
1616
vimExpressionOf,
1717
} from "./vim_evaluatable.ts";
1818

19-
// Note: Imports only types and is used only in tsdoc.
20-
// deno-lint-ignore no-unused-vars
21-
import type { Expression } from "./expression.ts";
22-
// deno-lint-ignore no-unused-vars
23-
import type { RawString } from "./string.ts";
24-
2519
/**
2620
* Converts a JavaScript value to a string that can be parsed with Vim `eval()`.
2721
*
@@ -47,7 +41,7 @@ import type { RawString } from "./string.ts";
4741
* - `Boolean`, `Number`, `String`, and `BigInt` (obtainable via `Object()`) objects are converted to the corresponding primitive values. `Symbol` objects (obtainable via `Object()`) are treated as plain objects.
4842
* - `undefined`, `Function`, and `Symbol` values are either omitted (when found in an object) or changed to null (when found in an array or a single value).
4943
* - `Infinity` and `NaN` numbers are converted to the corresponding Vim formula. Note that if they are included in the value returned from Vim, they will be converted to `null`.
50-
* - The special {@linkcode Expression} or {@linkcode RawString} objects are serialized to Vim's expression.
44+
* - The special {@linkcode [eval].Expression|Expression} or {@linkcode [eval].RawString|RawString} objects are serialized to Vim's expression.
5145
* - If `Object` has a `toJSON()` method, it will be invoked and the result will be serialized again. But if the return value of `toJSON()` has a `toJSON()` method, it will **NOT** be invoked again.
5246
*
5347
* When a `Array` or `Object` has a circular reference, a `TypeError` will be thrown.

eval/use_eval.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ import { ulid } from "@std/ulid";
55
import { execute } from "../helper/execute.ts";
66
import { stringify } from "./stringify.ts";
77

8-
// Note: Imports only types and is used only in tsdoc.
9-
// deno-lint-ignore no-unused-vars
10-
import type { Expression } from "./expression.ts";
11-
// deno-lint-ignore no-unused-vars
12-
import type { RawString } from "./string.ts";
13-
148
/**
15-
* Allows to use {@linkcode Expression} and {@linkcode RawString} transparently
9+
* Allows to use {@linkcode [eval].Expression|Expression} and {@linkcode [eval].RawString|RawString} transparently
1610
* within blocks.
1711
*
1812
* ```typescript

helper/expr_string.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ import { isUndefined } from "@core/unknownutil/is/undefined";
4141
import { ulid } from "@std/ulid";
4242
import { execute } from "./execute.ts";
4343

44-
// Note: Imports only types and is used only in tsdoc.
45-
// deno-lint-ignore no-unused-vars
46-
import type { isRawString, RawString, rawString } from "../eval/string.ts";
47-
4844
const EXPR_STRING_MARK = "__denops_expr_string";
4945

5046
/**
5147
* String that marked as Vim's string constant format.
5248
*
53-
* @deprecated Use {@linkcode rawString} and {@linkcode RawString}
49+
* @deprecated Use {@linkcode [eval].rawString|rawString} and {@linkcode [eval].RawString|RawString}
5450
*/
5551
export type ExprString = string & {
5652
/**
@@ -128,7 +124,7 @@ const isInstanceOfString = isInstanceOf(String);
128124
* console.log(isExprString("foo")); // outputs: false
129125
* ```
130126
*
131-
* @deprecated Use {@linkcode rawString} and {@linkcode isRawString}
127+
* @deprecated Use {@linkcode [eval].rawString|rawString} and {@linkcode [eval].isRawString:isRawString}
132128
*/
133129
export function isExprString(x: unknown): x is ExprString {
134130
return isObjectOf({

lambda/mod.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ import { isTupleOf } from "@core/unknownutil/is/tuple-of";
4040
import { stringify } from "../eval/stringify.ts";
4141
import { expr, type Expression } from "../eval/expression.ts";
4242

43-
// Note: Imports only types and is used only in tsdoc.
44-
// deno-lint-ignore no-unused-vars
45-
import type { RawString } from "../eval/string.ts";
46-
4743
/**
4844
* Lambda function identifier
4945
*/
@@ -235,7 +231,7 @@ export interface Lambda extends Disposable {
235231
* ```
236232
*
237233
* You can pass JSON serializable values, {@linkcode Expression} or
238-
* {@linkcode RawString} for the {@linkcode Lambda#notify} or
234+
* {@linkcode [eval].RawString|RawString} for the {@linkcode Lambda#notify} or
239235
* {@linkcode Lambda#request} arguments.
240236
*
241237
* ```typescript

0 commit comments

Comments
 (0)