Skip to content

Commit 2eda636

Browse files
Fix JS/TS type imports (#7661)
Co-authored-by: Amaury Chamayou <amchamay@microsoft.com> Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
1 parent 7674480 commit 2eda636

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

js/ccf-app/src/endpoints.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @module
99
*/
1010

11-
import { JsonCompatible, ccf } from "./global.js";
11+
import { type JsonCompatible, ccf } from "./global.js";
1212

1313
/**
1414
* The body of a request.

js/ccf-app/src/kv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
* @module
3838
*/
3939

40-
import { KvMap, KvSet, ccf } from "./global.js";
41-
import { DataConverter } from "./converters.js";
40+
import { type KvMap, type KvSet, ccf } from "./global.js";
41+
import { type DataConverter } from "./converters.js";
4242

4343
export class TypedKvMap<K, V> {
4444
constructor(

js/ccf-app/src/polyfill.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { TextEncoder, TextDecoder } from "util";
2121

2222
// Note: It is important that only types are imported here to prevent executing
2323
// the module at this point (which would query the ccf global before we polyfilled it).
24-
import {
24+
import type {
2525
CCF,
2626
KvMaps,
2727
KvMap,

js/ccf-app/test/polyfill.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { assert } from "chai";
22
import * as crypto from "crypto";
33
import "../src/polyfill.js";
4-
import {
4+
import type {
55
AesKwpParams,
6-
ccf,
76
DigestAlgorithm,
87
RsaOaepAesKwpParams,
98
RsaOaepParams,
109
} from "../src/global.js";
10+
import { ccf } from "../src/global.js";
1111
import * as textcodec from "../src/textcodec.js";
1212
import { generateSelfSignedCert, generateCertChain } from "./crypto.js";
1313
import { toArrayBuffer } from "../src/utils.js";

js/ccf-app/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"moduleResolution": "node",
66
"esModuleInterop": true,
77
"resolveJsonModule": true,
8+
"verbatimModuleSyntax": true,
89
"allowJs": true,
910
"lib": ["ES2020"],
1011
"declaration": true,

0 commit comments

Comments
 (0)