Skip to content

Commit b1ec78b

Browse files
committed
👍 exports sub modules
1 parent d087b73 commit b1ec78b

File tree

5 files changed

+44
-10
lines changed

5 files changed

+44
-10
lines changed

deno.jsonc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"./buffer": "./buffer/mod.ts",
1010
"./bufname": "./bufname/mod.ts",
1111
"./eval": "./eval/mod.ts",
12+
"./eval/expression": "./eval/expression.ts",
13+
"./eval/stringify": "./eval/stringify.ts",
14+
"./eval/string": "./eval/string.ts",
15+
"./eval/use-eval": "./eval/use_eval.ts",
1216
"./function": "./function/mod.ts",
1317
"./function/nvim": "./function/nvim/mod.ts",
1418
"./function/vim": "./function/vim/mod.ts",
@@ -64,6 +68,10 @@
6468
"jsr:@denops/std/buffer": "./buffer/mod.ts",
6569
"jsr:@denops/std/bufname": "./bufname/mod.ts",
6670
"jsr:@denops/std/eval": "./eval/mod.ts",
71+
"jsr:@denops/std/eval/expression": "./eval/expression.ts",
72+
"jsr:@denops/std/eval/stringify": "./eval/stringify.ts",
73+
"jsr:@denops/std/eval/string": "./eval/string.ts",
74+
"jsr:@denops/std/eval/use-eval": "./eval/use_eval.ts",
6775
"jsr:@denops/std/function": "./function/mod.ts",
6876
"jsr:@denops/std/function/nvim": "./function/nvim/mod.ts",
6977
"jsr:@denops/std/function/vim": "./function/vim/mod.ts",

eval/expression.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* This module provides utilities for creating Vim expressions in TypeScript.
3+
*
4+
* @module
5+
*/
6+
17
import type { Predicate } from "@core/unknownutil/type";
28
import { isIntersectionOf } from "@core/unknownutil/is/intersection-of";
39
import { isLiteralOf } from "@core/unknownutil/is/literal-of";
@@ -17,7 +23,7 @@ import { stringify } from "./stringify.ts";
1723
*
1824
* ```typescript
1925
* import { assertEquals } from "jsr:@std/assert/equals";
20-
* import { expr } from "jsr:@denops/std/eval";
26+
* import { expr } from "jsr:@denops/std/eval/expression";
2127
*
2228
* const s: string = expr`foo`;
2329
* assertEquals(typeof s, "object"); // is not "string"
@@ -49,7 +55,7 @@ interface ExpressionProps extends VimEvaluatable {
4955
*
5056
* ```typescript
5157
* import { assertEquals } from "jsr:@std/assert/equals";
52-
* import { expr } from "jsr:@denops/std/eval";
58+
* import { expr } from "jsr:@denops/std/eval/expression";
5359
*
5460
* assertEquals(
5561
* expr`raw_vim_expression`.toString(),
@@ -77,7 +83,7 @@ export function expr(
7783
*
7884
* ```typescript
7985
* import { assert, assertFalse } from "jsr:@std/assert";
80-
* import { isExpression, expr } from "jsr:@denops/std/eval";
86+
* import { isExpression, expr } from "jsr:@denops/std/eval/expression";
8187
*
8288
* assert(isExpression(expr`123`));
8389
*

eval/string.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* This module provides utilities for creating Vim string in TypeScript.
3+
*
4+
* @module
5+
*/
6+
17
import type { Predicate } from "@core/unknownutil/type";
28
import { isIntersectionOf } from "@core/unknownutil/is/intersection-of";
39
import { isLiteralOf } from "@core/unknownutil/is/literal-of";
@@ -21,7 +27,7 @@ import {
2127
*
2228
* ```typescript
2329
* import { assertEquals } from "jsr:@std/assert/equals";
24-
* import { rawString } from "jsr:@denops/std/eval";
30+
* import { rawString } from "jsr:@denops/std/eval/string";
2531
*
2632
* const s: string = rawString`foo`;
2733
* assertEquals(s.toString(), "foo");
@@ -76,7 +82,7 @@ interface RawStringProps extends VimEvaluatable {
7682
*
7783
* ```typescript
7884
* import { assertEquals } from "jsr:@std/assert/equals";
79-
* import { rawString } from "jsr:@denops/std/eval";
85+
* import { rawString } from "jsr:@denops/std/eval/string";
8086
*
8187
* assertEquals(
8288
* rawString`foo`.toString(),
@@ -108,7 +114,7 @@ export function rawString(
108114
* Returns `true` if the value is a {@linkcode RawString}.
109115
*
110116
* ```typescript
111-
* import { isRawString, rawString } from "jsr:@denops/std/eval";
117+
* import { isRawString, rawString } from "jsr:@denops/std/eval/string";
112118
*
113119
* isRawString(rawString`foo`);
114120
* // true

eval/stringify.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* This module provides the function to serialize JavaScript values into Vim values.
3+
*
4+
* @module
5+
*/
6+
17
import { isArray } from "@core/unknownutil/is/array";
28
import { isBoolean } from "@core/unknownutil/is/boolean";
39
import { isCustomJsonable } from "@core/unknownutil/is/custom-jsonable";
@@ -48,7 +54,8 @@ import {
4854
*
4955
* ```typescript
5056
* import type { Denops } from "jsr:@denops/std";
51-
* import { expr, stringify } from "jsr:@denops/std/eval";
57+
* import { expr } from "jsr:@denops/std/eval/expression";
58+
* import { stringify } from "jsr:@denops/std/eval/stringify";
5259
*
5360
* export async function main(denops: Denops): Promise<void> {
5461
* const value = {

eval/use_eval.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* This module provides the function to use Vim expressions within blocks.
3+
*
4+
* @module
5+
*/
6+
17
import type { Context, Denops, Dispatcher, Meta } from "@denops/core";
28
import { isString } from "@core/unknownutil/is/string";
39
import { isUndefined } from "@core/unknownutil/is/undefined";
@@ -6,13 +12,14 @@ import { execute } from "../helper/execute.ts";
612
import { stringify } from "./stringify.ts";
713

814
/**
9-
* Allows to use {@linkcode [eval].Expression|Expression} and {@linkcode [eval].RawString|RawString} transparently
10-
* within blocks.
15+
* Allows to use {@linkcode [eval].Expression|Expression} and {@linkcode [eval].RawString|RawString} transparently within blocks.
1116
*
1217
* ```typescript
1318
* import type { Denops } from "jsr:@denops/std";
1419
* import * as fn from "jsr:@denops/std/function";
15-
* import { expr, rawString, useEval } from "jsr:@denops/std/eval";
20+
* import { expr } from "jsr:@denops/std/eval/expression";
21+
* import { rawString } from "jsr:@denops/std/eval/string";
22+
* import { useEval } from "jsr:@denops/std/eval/use-eval";
1623
*
1724
* export async function main(denops: Denops): Promise<void> {
1825
* await useEval(denops, async (denops) => {

0 commit comments

Comments
 (0)