qsharp-lang 1.0.27-dev → 1.0.29-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +7 -1
- package/dist/browser.js +6 -2
- package/dist/compiler/compiler.d.ts +6 -6
- package/dist/compiler/compiler.js +16 -8
- package/dist/debug-service/debug-service.d.ts +2 -2
- package/dist/debug-service/debug-service.js +5 -3
- package/dist/katas-content.generated.js +2 -2
- package/dist/language-service/language-service.d.ts +7 -2
- package/dist/language-service/language-service.js +48 -30
- package/dist/main.d.ts +7 -1
- package/dist/main.js +11 -2
- package/dist/samples.generated.js +3 -3
- package/lib/node/qsc_wasm.cjs +248 -96
- package/lib/node/qsc_wasm.d.cts +39 -12
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +51 -16
- package/lib/web/qsc_wasm.js +235 -93
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/ux/index.ts +1 -1
- package/ux/reTable.tsx +1 -0
- package/ux/resultsTable.tsx +40 -5
package/lib/node/qsc_wasm.d.cts
CHANGED
|
@@ -14,16 +14,16 @@ export function setLogLevel(level: number): void;
|
|
|
14
14
|
*/
|
|
15
15
|
export function git_hash(): string;
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {(Array<any>)[]} sources
|
|
18
18
|
* @returns {string}
|
|
19
19
|
*/
|
|
20
|
-
export function get_qir(
|
|
20
|
+
export function get_qir(sources: (Array<any>)[]): string;
|
|
21
21
|
/**
|
|
22
|
-
* @param {
|
|
22
|
+
* @param {(Array<any>)[]} sources
|
|
23
23
|
* @param {string} params
|
|
24
24
|
* @returns {string}
|
|
25
25
|
*/
|
|
26
|
-
export function get_estimates(
|
|
26
|
+
export function get_estimates(sources: (Array<any>)[], params: string): string;
|
|
27
27
|
/**
|
|
28
28
|
* @param {string} name
|
|
29
29
|
* @returns {string | undefined}
|
|
@@ -35,13 +35,13 @@ export function get_library_source_content(name: string): string | undefined;
|
|
|
35
35
|
*/
|
|
36
36
|
export function get_hir(code: string): string;
|
|
37
37
|
/**
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {(Array<any>)[]} sources
|
|
39
39
|
* @param {string} expr
|
|
40
40
|
* @param {Function} event_cb
|
|
41
41
|
* @param {number} shots
|
|
42
42
|
* @returns {boolean}
|
|
43
43
|
*/
|
|
44
|
-
export function run(
|
|
44
|
+
export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* @param {string} solution_code
|
|
47
47
|
* @param {any} exercise_sources_js
|
|
@@ -173,13 +173,13 @@ export interface ISignatureHelp {
|
|
|
173
173
|
|
|
174
174
|
export interface ISignatureInformation {
|
|
175
175
|
label: string;
|
|
176
|
-
documentation
|
|
176
|
+
documentation: string;
|
|
177
177
|
parameters: IParameterInformation[];
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
export interface IParameterInformation {
|
|
181
181
|
label: ISpan;
|
|
182
|
-
documentation
|
|
182
|
+
documentation: string;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
export interface IWorkspaceEdit {
|
|
@@ -213,13 +213,12 @@ export class DebugService {
|
|
|
213
213
|
*/
|
|
214
214
|
constructor();
|
|
215
215
|
/**
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {string} source
|
|
216
|
+
* @param {(Array<any>)[]} sources
|
|
218
217
|
* @param {string} target_profile
|
|
219
218
|
* @param {string | undefined} entry
|
|
220
219
|
* @returns {string}
|
|
221
220
|
*/
|
|
222
|
-
load_source(
|
|
221
|
+
load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
|
|
223
222
|
/**
|
|
224
223
|
* @returns {IQuantumStateList}
|
|
225
224
|
*/
|
|
@@ -267,9 +266,19 @@ export class DebugService {
|
|
|
267
266
|
export class LanguageService {
|
|
268
267
|
free(): void;
|
|
269
268
|
/**
|
|
269
|
+
*/
|
|
270
|
+
constructor();
|
|
271
|
+
/**
|
|
270
272
|
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
273
|
+
* @param {(uri: string) => Promise<string | null>} read_file
|
|
274
|
+
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
275
|
+
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
276
|
+
* @returns {Promise<any>}
|
|
277
|
+
*/
|
|
278
|
+
start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void, read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>): Promise<any>;
|
|
279
|
+
/**
|
|
271
280
|
*/
|
|
272
|
-
|
|
281
|
+
stop_background_work(): void;
|
|
273
282
|
/**
|
|
274
283
|
* @param {IWorkspaceConfiguration} config
|
|
275
284
|
*/
|
|
@@ -340,3 +349,21 @@ export class LanguageService {
|
|
|
340
349
|
*/
|
|
341
350
|
prepare_rename(uri: string, offset: number): ITextEdit | undefined;
|
|
342
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* a minimal implementation for interacting with async JS filesystem callbacks to
|
|
354
|
+
* load project files
|
|
355
|
+
*/
|
|
356
|
+
export class ProjectLoader {
|
|
357
|
+
free(): void;
|
|
358
|
+
/**
|
|
359
|
+
* @param {(uri: string) => Promise<string | null>} read_file
|
|
360
|
+
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
361
|
+
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
362
|
+
*/
|
|
363
|
+
constructor(read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>);
|
|
364
|
+
/**
|
|
365
|
+
* @param {{ manifestDirectory: string }} manifest
|
|
366
|
+
* @returns {Promise<[string, string][]>}
|
|
367
|
+
*/
|
|
368
|
+
load_project(manifest: { manifestDirectory: string }): Promise<[string, string][]>;
|
|
369
|
+
}
|
|
Binary file
|
package/lib/web/qsc_wasm.d.ts
CHANGED
|
@@ -14,16 +14,16 @@ export function setLogLevel(level: number): void;
|
|
|
14
14
|
*/
|
|
15
15
|
export function git_hash(): string;
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {(Array<any>)[]} sources
|
|
18
18
|
* @returns {string}
|
|
19
19
|
*/
|
|
20
|
-
export function get_qir(
|
|
20
|
+
export function get_qir(sources: (Array<any>)[]): string;
|
|
21
21
|
/**
|
|
22
|
-
* @param {
|
|
22
|
+
* @param {(Array<any>)[]} sources
|
|
23
23
|
* @param {string} params
|
|
24
24
|
* @returns {string}
|
|
25
25
|
*/
|
|
26
|
-
export function get_estimates(
|
|
26
|
+
export function get_estimates(sources: (Array<any>)[], params: string): string;
|
|
27
27
|
/**
|
|
28
28
|
* @param {string} name
|
|
29
29
|
* @returns {string | undefined}
|
|
@@ -35,13 +35,13 @@ export function get_library_source_content(name: string): string | undefined;
|
|
|
35
35
|
*/
|
|
36
36
|
export function get_hir(code: string): string;
|
|
37
37
|
/**
|
|
38
|
-
* @param {
|
|
38
|
+
* @param {(Array<any>)[]} sources
|
|
39
39
|
* @param {string} expr
|
|
40
40
|
* @param {Function} event_cb
|
|
41
41
|
* @param {number} shots
|
|
42
42
|
* @returns {boolean}
|
|
43
43
|
*/
|
|
44
|
-
export function run(
|
|
44
|
+
export function run(sources: (Array<any>)[], expr: string, event_cb: Function, shots: number): boolean;
|
|
45
45
|
/**
|
|
46
46
|
* @param {string} solution_code
|
|
47
47
|
* @param {any} exercise_sources_js
|
|
@@ -173,13 +173,13 @@ export interface ISignatureHelp {
|
|
|
173
173
|
|
|
174
174
|
export interface ISignatureInformation {
|
|
175
175
|
label: string;
|
|
176
|
-
documentation
|
|
176
|
+
documentation: string;
|
|
177
177
|
parameters: IParameterInformation[];
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
export interface IParameterInformation {
|
|
181
181
|
label: ISpan;
|
|
182
|
-
documentation
|
|
182
|
+
documentation: string;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
export interface IWorkspaceEdit {
|
|
@@ -213,13 +213,12 @@ export class DebugService {
|
|
|
213
213
|
*/
|
|
214
214
|
constructor();
|
|
215
215
|
/**
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {string} source
|
|
216
|
+
* @param {(Array<any>)[]} sources
|
|
218
217
|
* @param {string} target_profile
|
|
219
218
|
* @param {string | undefined} entry
|
|
220
219
|
* @returns {string}
|
|
221
220
|
*/
|
|
222
|
-
load_source(
|
|
221
|
+
load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
|
|
223
222
|
/**
|
|
224
223
|
* @returns {IQuantumStateList}
|
|
225
224
|
*/
|
|
@@ -267,9 +266,19 @@ export class DebugService {
|
|
|
267
266
|
export class LanguageService {
|
|
268
267
|
free(): void;
|
|
269
268
|
/**
|
|
269
|
+
*/
|
|
270
|
+
constructor();
|
|
271
|
+
/**
|
|
270
272
|
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
273
|
+
* @param {(uri: string) => Promise<string | null>} read_file
|
|
274
|
+
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
275
|
+
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
276
|
+
* @returns {Promise<any>}
|
|
277
|
+
*/
|
|
278
|
+
start_background_work(diagnostics_callback: (uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void, read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>): Promise<any>;
|
|
279
|
+
/**
|
|
271
280
|
*/
|
|
272
|
-
|
|
281
|
+
stop_background_work(): void;
|
|
273
282
|
/**
|
|
274
283
|
* @param {IWorkspaceConfiguration} config
|
|
275
284
|
*/
|
|
@@ -340,6 +349,24 @@ export class LanguageService {
|
|
|
340
349
|
*/
|
|
341
350
|
prepare_rename(uri: string, offset: number): ITextEdit | undefined;
|
|
342
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* a minimal implementation for interacting with async JS filesystem callbacks to
|
|
354
|
+
* load project files
|
|
355
|
+
*/
|
|
356
|
+
export class ProjectLoader {
|
|
357
|
+
free(): void;
|
|
358
|
+
/**
|
|
359
|
+
* @param {(uri: string) => Promise<string | null>} read_file
|
|
360
|
+
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
361
|
+
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
362
|
+
*/
|
|
363
|
+
constructor(read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>);
|
|
364
|
+
/**
|
|
365
|
+
* @param {{ manifestDirectory: string }} manifest
|
|
366
|
+
* @returns {Promise<[string, string][]>}
|
|
367
|
+
*/
|
|
368
|
+
load_project(manifest: { manifestDirectory: string }): Promise<[string, string][]>;
|
|
369
|
+
}
|
|
343
370
|
|
|
344
371
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
345
372
|
|
|
@@ -347,7 +374,7 @@ export interface InitOutput {
|
|
|
347
374
|
readonly memory: WebAssembly.Memory;
|
|
348
375
|
readonly __wbg_debugservice_free: (a: number) => void;
|
|
349
376
|
readonly debugservice_new: () => number;
|
|
350
|
-
readonly debugservice_load_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number
|
|
377
|
+
readonly debugservice_load_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
351
378
|
readonly debugservice_capture_quantum_state: (a: number) => number;
|
|
352
379
|
readonly debugservice_get_stack_frames: (a: number) => number;
|
|
353
380
|
readonly debugservice_eval_next: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -357,7 +384,9 @@ export interface InitOutput {
|
|
|
357
384
|
readonly debugservice_get_breakpoints: (a: number, b: number, c: number) => number;
|
|
358
385
|
readonly debugservice_get_locals: (a: number) => number;
|
|
359
386
|
readonly __wbg_languageservice_free: (a: number) => void;
|
|
360
|
-
readonly languageservice_new: (
|
|
387
|
+
readonly languageservice_new: () => number;
|
|
388
|
+
readonly languageservice_start_background_work: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
389
|
+
readonly languageservice_stop_background_work: (a: number) => void;
|
|
361
390
|
readonly languageservice_update_configuration: (a: number, b: number) => void;
|
|
362
391
|
readonly languageservice_update_document: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
363
392
|
readonly languageservice_close_document: (a: number, b: number, c: number) => void;
|
|
@@ -372,6 +401,9 @@ export interface InitOutput {
|
|
|
372
401
|
readonly languageservice_prepare_rename: (a: number, b: number, c: number, d: number) => number;
|
|
373
402
|
readonly initLogging: (a: number, b: number, c: number) => void;
|
|
374
403
|
readonly setLogLevel: (a: number) => void;
|
|
404
|
+
readonly __wbg_projectloader_free: (a: number) => void;
|
|
405
|
+
readonly projectloader_new: (a: number, b: number, c: number) => number;
|
|
406
|
+
readonly projectloader_load_project: (a: number, b: number) => number;
|
|
375
407
|
readonly git_hash: (a: number) => void;
|
|
376
408
|
readonly get_qir: (a: number, b: number, c: number) => void;
|
|
377
409
|
readonly get_estimates: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -381,9 +413,12 @@ export interface InitOutput {
|
|
|
381
413
|
readonly check_exercise_solution: (a: number, b: number, c: number, d: number) => number;
|
|
382
414
|
readonly __wbindgen_export_0: (a: number, b: number) => number;
|
|
383
415
|
readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
416
|
+
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
417
|
+
readonly __wbindgen_export_3: (a: number, b: number, c: number) => void;
|
|
384
418
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
385
|
-
readonly
|
|
386
|
-
readonly
|
|
419
|
+
readonly __wbindgen_export_4: (a: number, b: number, c: number) => void;
|
|
420
|
+
readonly __wbindgen_export_5: (a: number) => void;
|
|
421
|
+
readonly __wbindgen_export_6: (a: number, b: number, c: number, d: number) => void;
|
|
387
422
|
}
|
|
388
423
|
|
|
389
424
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|