Skip to content

Commit b307c4f

Browse files
committed
💪 Use import type instead for Denops
1 parent 6e91105 commit b307c4f

File tree

28 files changed

+74
-74
lines changed

28 files changed

+74
-74
lines changed

argument/flags.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const shortPattern = /^-([a-zA-Z0-9])(.*)/;
99
* Parse string array to extract flags (-f/--flag).
1010
*
1111
* ```typescript
12-
* import { Denops } from "../mod.ts";
12+
* import type { Denops } from "../mod.ts";
1313
* import { parseFlags } from "./mod.ts";
1414
*
1515
* export async function main(denops: Denops): Promise<void> {
@@ -66,7 +66,7 @@ export function parseFlags(args: string[]): [Flags, string[]] {
6666
* Validate if `flags` has unknown attributes.
6767
*
6868
* ```typescript
69-
* import { Denops } from "../mod.ts";
69+
* import type { Denops } from "../mod.ts";
7070
* import { parse, validateFlags } from "./mod.ts";
7171
*
7272
* export async function main(denops: Denops): Promise<void> {
@@ -102,7 +102,7 @@ export function validateFlags(flags: Flags, knownAttributes: string[]): void {
102102
* Format `key` and `value` to construct string array.
103103
*
104104
* ```typescript
105-
* import { Denops } from "../mod.ts";
105+
* import type { Denops } from "../mod.ts";
106106
* import { formatFlag } from "./mod.ts";
107107
*
108108
* export async function main(denops: Denops): Promise<void> {
@@ -133,7 +133,7 @@ export function formatFlag(
133133
* Format `flags` to construct string array.
134134
*
135135
* ```typescript
136-
* import { Denops } from "../mod.ts";
136+
* import type { Denops } from "../mod.ts";
137137
* import { formatFlags, parse } from "./mod.ts";
138138
*
139139
* export async function main(denops: Denops): Promise<void> {

argument/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { Flags, parseFlags } from "./flags.ts";
6969
* Parse string array to extract opts, flags.
7070
*
7171
* ```typescript
72-
* import { Denops } from "../mod.ts";
72+
* import type { Denops } from "../mod.ts";
7373
* import { parse } from "./mod.ts";
7474
*
7575
* export async function main(denops: Denops): Promise<void> {

argument/opts.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const optPattern = /^\+\+([a-zA-Z0-9-]+)(?:=(.*))?/;
2424
* Parse string array to extract opts (++opt).
2525
*
2626
* ```typescript
27-
* import { Denops } from "../mod.ts";
27+
* import type { Denops } from "../mod.ts";
2828
* import { parseOpts } from "./mod.ts";
2929
*
3030
* export async function main(denops: Denops): Promise<void> {
@@ -77,7 +77,7 @@ export function parseOpts(args: string[]): [Opts, string[]] {
7777
* Validate if `opts` has unknown attributes.
7878
*
7979
* ```typescript
80-
* import { Denops } from "../mod.ts";
80+
* import type { Denops } from "../mod.ts";
8181
* import { builtinOpts, parse, validateOpts } from "./mod.ts";
8282
*
8383
* export async function main(denops: Denops): Promise<void> {
@@ -112,7 +112,7 @@ export function validateOpts(opts: Opts, knownAttributes: string[]): void {
112112
* Format `key` and `value` to construct string array.
113113
*
114114
* ```typescript
115-
* import { Denops } from "../mod.ts";
115+
* import type { Denops } from "../mod.ts";
116116
* import { formatOpt } from "./mod.ts";
117117
*
118118
* export async function main(denops: Denops): Promise<void> {
@@ -132,7 +132,7 @@ export function formatOpt(key: string, value: string | undefined): string[] {
132132
* Format `opts` to construct string array.
133133
*
134134
* ```typescript
135-
* import { Denops } from "../mod.ts";
135+
* import type { Denops } from "../mod.ts";
136136
* import { formatOpts, parse } from "../argument/mod.ts";
137137
*
138138
* export async function main(denops: Denops): Promise<void> {

autocmd/common.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Denops } from "https://deno.land/x/denops_core@v6.0.5/mod.ts";
1+
import type { Denops } from "https://deno.land/x/denops_core@v6.0.5/mod.ts";
22
import {
33
AutocmdEvent,
44
DefineOptions,
@@ -12,7 +12,7 @@ import { buildDefineExpr, buildRemoveExpr } from "./utils.ts";
1212
* Define an autocmd
1313
*
1414
* ```typescript
15-
* import { Denops } from "../mod.ts";
15+
* import type { Denops } from "../mod.ts";
1616
* import * as autocmd from "./mod.ts";
1717
*
1818
* export async function main(denops: Denops): Promise<void> {
@@ -54,7 +54,7 @@ export async function define(
5454
* Remove an autocmd
5555
*
5656
* ```typescript
57-
* import { Denops } from "../mod.ts";
57+
* import type { Denops } from "../mod.ts";
5858
* import * as autocmd from "./mod.ts";
5959
*
6060
* export async function main(denops: Denops): Promise<void> {
@@ -88,7 +88,7 @@ export async function remove(
8888
* List defined autocmds
8989
*
9090
* ```typescript
91-
* import { Denops } from "../mod.ts";
91+
* import type { Denops } from "../mod.ts";
9292
* import * as autocmd from "./mod.ts";
9393
*
9494
* export async function main(denops: Denops): Promise<void> {
@@ -138,7 +138,7 @@ export async function list(
138138
* Emit an autocmd in a buffer
139139
*
140140
* ```typescript
141-
* import { Denops } from "../mod.ts";
141+
* import type { Denops } from "../mod.ts";
142142
* import * as autocmd from "./mod.ts";
143143
*
144144
* export async function main(denops: Denops): Promise<void> {
@@ -182,7 +182,7 @@ export async function emit(
182182
* Emit an autocmd in all buffers
183183
*
184184
* ```typescript
185-
* import { Denops } from "../mod.ts";
185+
* import type { Denops } from "../mod.ts";
186186
* import * as autocmd from "./mod.ts";
187187
*
188188
* export async function main(denops: Denops): Promise<void> {

autocmd/group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type GroupRemoveOptions = Omit<RemoveOptions, "group">;
1010
* Create an autocmd group and define/remove autocmds in that group.
1111
*
1212
* ```typescript
13-
* import { Denops } from "../mod.ts";
13+
* import type { Denops } from "../mod.ts";
1414
* import { group } from "./group.ts";
1515
*
1616
* export async function main(denops: Denops): Promise<void> {

batch/batch.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class BatchHelper implements Denops {
9898
* Call multiple denops functions sequentially without RPC overhead
9999
*
100100
* ```typescript
101-
* import { Denops } from "../mod.ts";
101+
* import type { Denops } from "../mod.ts";
102102
* import { batch } from "./batch.ts";
103103
*
104104
* export async function main(denops: Denops): Promise<void> {
@@ -114,7 +114,7 @@ class BatchHelper implements Denops {
114114
* `batch()` like:
115115
*
116116
* ```typescript
117-
* import { Denops } from "../mod.ts";
117+
* import type { Denops } from "../mod.ts";
118118
* import { batch } from "./batch.ts";
119119
*
120120
* async function replace(denops: Denops, content: string): Promise<void> {
@@ -139,7 +139,7 @@ class BatchHelper implements Denops {
139139
* falsy value in `batch()`, indicating that you **cannot** write code like below:
140140
*
141141
* ```typescript
142-
* import { Denops } from "../mod.ts";
142+
* import type { Denops } from "../mod.ts";
143143
* import { batch } from "./batch.ts";
144144
*
145145
* export async function main(denops: Denops): Promise<void> {
@@ -158,7 +158,7 @@ class BatchHelper implements Denops {
158158
* like:
159159
*
160160
* ```typescript
161-
* import { Denops } from "../mod.ts";
161+
* import type { Denops } from "../mod.ts";
162162
* import { batch } from "./batch.ts";
163163
* import * as lambda from "../lambda/mod.ts";
164164
*

batch/collect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class CollectHelper implements Denops {
9191
* Call multiple denops functions sequentially without RPC overhead and return values
9292
*
9393
* ```typescript
94-
* import { Denops } from "../mod.ts";
94+
* import type { Denops } from "../mod.ts";
9595
* import { collect } from "./collect.ts";
9696
*
9797
* export async function main(denops: Denops): Promise<void> {
@@ -110,7 +110,7 @@ class CollectHelper implements Denops {
110110
* `collect()`, indicating that you **cannot** write code like below:
111111
*
112112
* ```typescript
113-
* import { Denops } from "../mod.ts";
113+
* import type { Denops } from "../mod.ts";
114114
* import { collect } from "./collect.ts";
115115
*
116116
* export async function main(denops: Denops): Promise<void> {

buffer/buffer.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
134134
* Open a `bufname` buffer with given options on the current window
135135
*
136136
* ```typescript
137-
* import { Denops } from "../mod.ts";
137+
* import type { Denops } from "../mod.ts";
138138
* import { open } from "../buffer/mod.ts";
139139
*
140140
* export async function main(denops: Denops): Promise<void> {
@@ -155,7 +155,7 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
155155
* the option like:
156156
*
157157
* ```typescript
158-
* import { Denops } from "../mod.ts";
158+
* import type { Denops } from "../mod.ts";
159159
* import { open } from "../buffer/mod.ts";
160160
*
161161
* export async function main(denops: Denops): Promise<void> {
@@ -167,7 +167,7 @@ async function ensurePrerequisites(denops: Denops): Promise<string> {
167167
* tabpage number like:
168168
*
169169
* ```typescript
170-
* import { Denops } from "../mod.ts";
170+
* import type { Denops } from "../mod.ts";
171171
* import { open } from "../buffer/mod.ts";
172172
*
173173
* export async function main(denops: Denops): Promise<void> {
@@ -217,7 +217,7 @@ export interface OpenResult {
217217
* Reload the content of the `bufnr` buffer
218218
*
219219
* ```typescript
220-
* import { Denops } from "../mod.ts";
220+
* import type { Denops } from "../mod.ts";
221221
* import * as fn from "../function/mod.ts";
222222
* import { open, reload } from "../buffer/mod.ts";
223223
*
@@ -245,7 +245,7 @@ export async function reload(denops: Denops, bufnr: number): Promise<void> {
245245
* Decode raw binary content for string array for the `bufnr` buffer
246246
*
247247
* ```typescript
248-
* import { Denops } from "../mod.ts";
248+
* import type { Denops } from "../mod.ts";
249249
* import * as fn from "../function/mod.ts";
250250
* import { decode, open, replace } from "../buffer/mod.ts";
251251
*
@@ -309,7 +309,7 @@ export interface DecodeResult {
309309
* Append content under the current cursor position or given lnum of the buffer
310310
*
311311
* ```typescript
312-
* import { Denops } from "../mod.ts";
312+
* import type { Denops } from "../mod.ts";
313313
* import * as fn from "../function/mod.ts";
314314
* import { append, open } from "../buffer/mod.ts";
315315
*
@@ -349,7 +349,7 @@ export interface AppendOptions {
349349
* Replace the content of the `bufnr` buffer
350350
*
351351
* ```typescript
352-
* import { Denops } from "../mod.ts";
352+
* import type { Denops } from "../mod.ts";
353353
* import * as fn from "../function/mod.ts";
354354
* import { open, replace } from "../buffer/mod.ts";
355355
*
@@ -397,7 +397,7 @@ export interface ReplaceOptions {
397397
* this function to concrete the content of such buffer to prevent this discard.
398398
*
399399
* ```typescript
400-
* import { Denops } from "../mod.ts";
400+
* import type { Denops } from "../mod.ts";
401401
* import * as fn from "../function/mod.ts";
402402
* import { concrete, open, replace } from "../buffer/mod.ts";
403403
*
@@ -447,7 +447,7 @@ export async function concrete(
447447
* Ensure the executor is executed under the specified buffer
448448
*
449449
* ```typescript
450-
* import { Denops } from "../mod.ts";
450+
* import type { Denops } from "../mod.ts";
451451
* import * as option from "../option/mod.ts";
452452
* import * as fn from "../function/mod.ts";
453453
* import { ensure, open } from "../buffer/mod.ts";
@@ -504,7 +504,7 @@ export async function ensure<T>(
504504
* Ensure the executor is executed under a modifiable buffer
505505
*
506506
* ```typescript
507-
* import { Denops } from "../mod.ts";
507+
* import type { Denops } from "../mod.ts";
508508
* import * as fn from "../function/mod.ts";
509509
* import { modifiable, open } from "../buffer/mod.ts";
510510
*

buffer/decoration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface Decoration {
2222
* Decorate the specified buffer with decorations
2323
*
2424
* ```typescript
25-
* import { Denops } from "../mod.ts";
25+
* import type { Denops } from "../mod.ts";
2626
* import * as fn from "../function/mod.ts";
2727
* import { decorate, open } from "../buffer/mod.ts";
2828
*
@@ -69,7 +69,7 @@ export function decorate(
6969
* Undecorate the specified buffer
7070
*
7171
* ```typescript
72-
* import { Denops } from "../mod.ts";
72+
* import type { Denops } from "../mod.ts";
7373
* import * as fn from "../function/mod.ts";
7474
* import { decorate, open, undecorate } from "../buffer/mod.ts";
7575
*

function/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* A module to provide functions of Vim and Neovim native functions.
33
*
44
* ```typescript
5-
* import { Denops } from "../mod.ts";
5+
* import type { Denops } from "../mod.ts";
66
* import * as fn from "../function/mod.ts";
77
*
88
* export async function main(denops: Denops): Promise<void> {

0 commit comments

Comments
 (0)