qsharp-lang 1.0.28-dev → 1.0.30-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/language-service/language-service.d.ts +9 -4
- package/dist/language-service/language-service.js +50 -33
- package/dist/main.d.ts +7 -1
- package/dist/main.js +11 -2
- package/lib/node/qsc_wasm.cjs +250 -101
- package/lib/node/qsc_wasm.d.cts +40 -14
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +53 -19
- package/lib/web/qsc_wasm.js +237 -98
- 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/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
|
*/
|
|
@@ -292,9 +301,8 @@ export class LanguageService {
|
|
|
292
301
|
update_notebook_document(notebook_uri: string, notebook_metadata: INotebookMetadata, cells: (ICell)[]): void;
|
|
293
302
|
/**
|
|
294
303
|
* @param {string} notebook_uri
|
|
295
|
-
* @param {(string)[]} cell_uris
|
|
296
304
|
*/
|
|
297
|
-
close_notebook_document(notebook_uri: string
|
|
305
|
+
close_notebook_document(notebook_uri: string): void;
|
|
298
306
|
/**
|
|
299
307
|
* @param {string} uri
|
|
300
308
|
* @param {number} offset
|
|
@@ -340,6 +348,24 @@ export class LanguageService {
|
|
|
340
348
|
*/
|
|
341
349
|
prepare_rename(uri: string, offset: number): ITextEdit | undefined;
|
|
342
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* a minimal implementation for interacting with async JS filesystem callbacks to
|
|
353
|
+
* load project files
|
|
354
|
+
*/
|
|
355
|
+
export class ProjectLoader {
|
|
356
|
+
free(): void;
|
|
357
|
+
/**
|
|
358
|
+
* @param {(uri: string) => Promise<string | null>} read_file
|
|
359
|
+
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
360
|
+
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
361
|
+
*/
|
|
362
|
+
constructor(read_file: (uri: string) => Promise<string | null>, list_directory: (uri: string) => Promise<[string, number][]>, get_manifest: (uri: string) => Promise<{ manifestDirectory: string }| null>);
|
|
363
|
+
/**
|
|
364
|
+
* @param {{ manifestDirectory: string }} manifest
|
|
365
|
+
* @returns {Promise<[string, string][]>}
|
|
366
|
+
*/
|
|
367
|
+
load_project(manifest: { manifestDirectory: string }): Promise<[string, string][]>;
|
|
368
|
+
}
|
|
343
369
|
|
|
344
370
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
345
371
|
|
|
@@ -347,7 +373,7 @@ export interface InitOutput {
|
|
|
347
373
|
readonly memory: WebAssembly.Memory;
|
|
348
374
|
readonly __wbg_debugservice_free: (a: number) => void;
|
|
349
375
|
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
|
|
376
|
+
readonly debugservice_load_source: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
351
377
|
readonly debugservice_capture_quantum_state: (a: number) => number;
|
|
352
378
|
readonly debugservice_get_stack_frames: (a: number) => number;
|
|
353
379
|
readonly debugservice_eval_next: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -357,12 +383,14 @@ export interface InitOutput {
|
|
|
357
383
|
readonly debugservice_get_breakpoints: (a: number, b: number, c: number) => number;
|
|
358
384
|
readonly debugservice_get_locals: (a: number) => number;
|
|
359
385
|
readonly __wbg_languageservice_free: (a: number) => void;
|
|
360
|
-
readonly languageservice_new: (
|
|
386
|
+
readonly languageservice_new: () => number;
|
|
387
|
+
readonly languageservice_start_background_work: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
388
|
+
readonly languageservice_stop_background_work: (a: number) => void;
|
|
361
389
|
readonly languageservice_update_configuration: (a: number, b: number) => void;
|
|
362
390
|
readonly languageservice_update_document: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
363
391
|
readonly languageservice_close_document: (a: number, b: number, c: number) => void;
|
|
364
392
|
readonly languageservice_update_notebook_document: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
365
|
-
readonly languageservice_close_notebook_document: (a: number, b: number, c: number
|
|
393
|
+
readonly languageservice_close_notebook_document: (a: number, b: number, c: number) => void;
|
|
366
394
|
readonly languageservice_get_completions: (a: number, b: number, c: number, d: number) => number;
|
|
367
395
|
readonly languageservice_get_definition: (a: number, b: number, c: number, d: number) => number;
|
|
368
396
|
readonly languageservice_get_references: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -372,6 +400,9 @@ export interface InitOutput {
|
|
|
372
400
|
readonly languageservice_prepare_rename: (a: number, b: number, c: number, d: number) => number;
|
|
373
401
|
readonly initLogging: (a: number, b: number, c: number) => void;
|
|
374
402
|
readonly setLogLevel: (a: number) => void;
|
|
403
|
+
readonly __wbg_projectloader_free: (a: number) => void;
|
|
404
|
+
readonly projectloader_new: (a: number, b: number, c: number) => number;
|
|
405
|
+
readonly projectloader_load_project: (a: number, b: number) => number;
|
|
375
406
|
readonly git_hash: (a: number) => void;
|
|
376
407
|
readonly get_qir: (a: number, b: number, c: number) => void;
|
|
377
408
|
readonly get_estimates: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -381,9 +412,12 @@ export interface InitOutput {
|
|
|
381
412
|
readonly check_exercise_solution: (a: number, b: number, c: number, d: number) => number;
|
|
382
413
|
readonly __wbindgen_export_0: (a: number, b: number) => number;
|
|
383
414
|
readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
415
|
+
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
416
|
+
readonly __wbindgen_export_3: (a: number, b: number, c: number) => void;
|
|
384
417
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
385
|
-
readonly
|
|
386
|
-
readonly
|
|
418
|
+
readonly __wbindgen_export_4: (a: number, b: number, c: number) => void;
|
|
419
|
+
readonly __wbindgen_export_5: (a: number) => void;
|
|
420
|
+
readonly __wbindgen_export_6: (a: number, b: number, c: number, d: number) => void;
|
|
387
421
|
}
|
|
388
422
|
|
|
389
423
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|