qsharp-lang 1.0.34-dev → 1.1.0-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.
@@ -70,8 +70,7 @@ export interface IBreakpointSpanList {
70
70
 
71
71
  export interface IBreakpointSpan {
72
72
  id: number;
73
- lo: number;
74
- hi: number;
73
+ range: IRange;
75
74
  }
76
75
 
77
76
  export interface IStackFrameList {
@@ -82,8 +81,7 @@ export interface IStackFrameList {
82
81
  export interface IStackFrame {
83
82
  name: string;
84
83
  path: string;
85
- lo: number;
86
- hi: number;
84
+ range: IRange;
87
85
  }
88
86
 
89
87
  export interface IVariableList {
@@ -118,8 +116,7 @@ export interface IQuantumState {
118
116
  }
119
117
 
120
118
  export interface VSDiagnostic {
121
- start_pos: number;
122
- end_pos: number;
119
+ range: IRange,
123
120
  message: string;
124
121
  severity: "error" | "warning" | "info"
125
122
  code?: string;
@@ -127,9 +124,7 @@ export interface VSDiagnostic {
127
124
  }
128
125
 
129
126
  export interface IRelatedInformation {
130
- source: string;
131
- start_pos: number;
132
- end_pos: number;
127
+ location: ILocation,
133
128
  message: string;
134
129
  }
135
130
 
@@ -151,18 +146,13 @@ export interface ICompletionItem {
151
146
  }
152
147
 
153
148
  export interface ITextEdit {
154
- range: ISpan;
149
+ range: IRange;
155
150
  newText: string;
156
151
  }
157
152
 
158
153
  export interface IHover {
159
154
  contents: string;
160
- span: ISpan
161
- }
162
-
163
- export interface ILocation {
164
- source: string;
165
- span: ISpan;
155
+ span: IRange
166
156
  }
167
157
 
168
158
  export interface ISignatureHelp {
@@ -178,7 +168,7 @@ export interface ISignatureInformation {
178
168
  }
179
169
 
180
170
  export interface IParameterInformation {
181
- label: ISpan;
171
+ label: [number, number];
182
172
  documentation: string;
183
173
  }
184
174
 
@@ -186,11 +176,6 @@ export interface IWorkspaceEdit {
186
176
  changes: [string, ITextEdit[]][];
187
177
  }
188
178
 
189
- export interface ISpan {
190
- start: number;
191
- end: number;
192
- }
193
-
194
179
  export interface ICell {
195
180
  uri: string;
196
181
  version: number;
@@ -201,6 +186,21 @@ export interface INotebookMetadata {
201
186
  targetProfile?: "unrestricted" | "base";
202
187
  }
203
188
 
189
+ export interface IPosition {
190
+ line: number;
191
+ character: number;
192
+ }
193
+
194
+ export interface IRange {
195
+ start: IPosition;
196
+ end: IPosition;
197
+ }
198
+
199
+ export interface ILocation {
200
+ source: string;
201
+ span: IRange;
202
+ }
203
+
204
204
 
205
205
  export type TargetProfile = "base" | "unrestricted";
206
206
 
@@ -305,48 +305,48 @@ export class LanguageService {
305
305
  close_notebook_document(notebook_uri: string): void;
306
306
  /**
307
307
  * @param {string} uri
308
- * @param {number} offset
308
+ * @param {IPosition} position
309
309
  * @returns {ICompletionList}
310
310
  */
311
- get_completions(uri: string, offset: number): ICompletionList;
311
+ get_completions(uri: string, position: IPosition): ICompletionList;
312
312
  /**
313
313
  * @param {string} uri
314
- * @param {number} offset
314
+ * @param {IPosition} position
315
315
  * @returns {ILocation | undefined}
316
316
  */
317
- get_definition(uri: string, offset: number): ILocation | undefined;
317
+ get_definition(uri: string, position: IPosition): ILocation | undefined;
318
318
  /**
319
319
  * @param {string} uri
320
- * @param {number} offset
320
+ * @param {IPosition} position
321
321
  * @param {boolean} include_declaration
322
322
  * @returns {(ILocation)[]}
323
323
  */
324
- get_references(uri: string, offset: number, include_declaration: boolean): (ILocation)[];
324
+ get_references(uri: string, position: IPosition, include_declaration: boolean): (ILocation)[];
325
325
  /**
326
326
  * @param {string} uri
327
- * @param {number} offset
327
+ * @param {IPosition} position
328
328
  * @returns {IHover | undefined}
329
329
  */
330
- get_hover(uri: string, offset: number): IHover | undefined;
330
+ get_hover(uri: string, position: IPosition): IHover | undefined;
331
331
  /**
332
332
  * @param {string} uri
333
- * @param {number} offset
333
+ * @param {IPosition} position
334
334
  * @returns {ISignatureHelp | undefined}
335
335
  */
336
- get_signature_help(uri: string, offset: number): ISignatureHelp | undefined;
336
+ get_signature_help(uri: string, position: IPosition): ISignatureHelp | undefined;
337
337
  /**
338
338
  * @param {string} uri
339
- * @param {number} offset
339
+ * @param {IPosition} position
340
340
  * @param {string} new_name
341
341
  * @returns {IWorkspaceEdit}
342
342
  */
343
- get_rename(uri: string, offset: number, new_name: string): IWorkspaceEdit;
343
+ get_rename(uri: string, position: IPosition, new_name: string): IWorkspaceEdit;
344
344
  /**
345
345
  * @param {string} uri
346
- * @param {number} offset
346
+ * @param {IPosition} position
347
347
  * @returns {ITextEdit | undefined}
348
348
  */
349
- prepare_rename(uri: string, offset: number): ITextEdit | undefined;
349
+ prepare_rename(uri: string, position: IPosition): ITextEdit | undefined;
350
350
  }
351
351
  /**
352
352
  * a minimal implementation for interacting with async JS filesystem callbacks to
Binary file
@@ -70,8 +70,7 @@ export interface IBreakpointSpanList {
70
70
 
71
71
  export interface IBreakpointSpan {
72
72
  id: number;
73
- lo: number;
74
- hi: number;
73
+ range: IRange;
75
74
  }
76
75
 
77
76
  export interface IStackFrameList {
@@ -82,8 +81,7 @@ export interface IStackFrameList {
82
81
  export interface IStackFrame {
83
82
  name: string;
84
83
  path: string;
85
- lo: number;
86
- hi: number;
84
+ range: IRange;
87
85
  }
88
86
 
89
87
  export interface IVariableList {
@@ -118,8 +116,7 @@ export interface IQuantumState {
118
116
  }
119
117
 
120
118
  export interface VSDiagnostic {
121
- start_pos: number;
122
- end_pos: number;
119
+ range: IRange,
123
120
  message: string;
124
121
  severity: "error" | "warning" | "info"
125
122
  code?: string;
@@ -127,9 +124,7 @@ export interface VSDiagnostic {
127
124
  }
128
125
 
129
126
  export interface IRelatedInformation {
130
- source: string;
131
- start_pos: number;
132
- end_pos: number;
127
+ location: ILocation,
133
128
  message: string;
134
129
  }
135
130
 
@@ -151,18 +146,13 @@ export interface ICompletionItem {
151
146
  }
152
147
 
153
148
  export interface ITextEdit {
154
- range: ISpan;
149
+ range: IRange;
155
150
  newText: string;
156
151
  }
157
152
 
158
153
  export interface IHover {
159
154
  contents: string;
160
- span: ISpan
161
- }
162
-
163
- export interface ILocation {
164
- source: string;
165
- span: ISpan;
155
+ span: IRange
166
156
  }
167
157
 
168
158
  export interface ISignatureHelp {
@@ -178,7 +168,7 @@ export interface ISignatureInformation {
178
168
  }
179
169
 
180
170
  export interface IParameterInformation {
181
- label: ISpan;
171
+ label: [number, number];
182
172
  documentation: string;
183
173
  }
184
174
 
@@ -186,11 +176,6 @@ export interface IWorkspaceEdit {
186
176
  changes: [string, ITextEdit[]][];
187
177
  }
188
178
 
189
- export interface ISpan {
190
- start: number;
191
- end: number;
192
- }
193
-
194
179
  export interface ICell {
195
180
  uri: string;
196
181
  version: number;
@@ -201,6 +186,21 @@ export interface INotebookMetadata {
201
186
  targetProfile?: "unrestricted" | "base";
202
187
  }
203
188
 
189
+ export interface IPosition {
190
+ line: number;
191
+ character: number;
192
+ }
193
+
194
+ export interface IRange {
195
+ start: IPosition;
196
+ end: IPosition;
197
+ }
198
+
199
+ export interface ILocation {
200
+ source: string;
201
+ span: IRange;
202
+ }
203
+
204
204
 
205
205
  export type TargetProfile = "base" | "unrestricted";
206
206
 
@@ -305,48 +305,48 @@ export class LanguageService {
305
305
  close_notebook_document(notebook_uri: string): void;
306
306
  /**
307
307
  * @param {string} uri
308
- * @param {number} offset
308
+ * @param {IPosition} position
309
309
  * @returns {ICompletionList}
310
310
  */
311
- get_completions(uri: string, offset: number): ICompletionList;
311
+ get_completions(uri: string, position: IPosition): ICompletionList;
312
312
  /**
313
313
  * @param {string} uri
314
- * @param {number} offset
314
+ * @param {IPosition} position
315
315
  * @returns {ILocation | undefined}
316
316
  */
317
- get_definition(uri: string, offset: number): ILocation | undefined;
317
+ get_definition(uri: string, position: IPosition): ILocation | undefined;
318
318
  /**
319
319
  * @param {string} uri
320
- * @param {number} offset
320
+ * @param {IPosition} position
321
321
  * @param {boolean} include_declaration
322
322
  * @returns {(ILocation)[]}
323
323
  */
324
- get_references(uri: string, offset: number, include_declaration: boolean): (ILocation)[];
324
+ get_references(uri: string, position: IPosition, include_declaration: boolean): (ILocation)[];
325
325
  /**
326
326
  * @param {string} uri
327
- * @param {number} offset
327
+ * @param {IPosition} position
328
328
  * @returns {IHover | undefined}
329
329
  */
330
- get_hover(uri: string, offset: number): IHover | undefined;
330
+ get_hover(uri: string, position: IPosition): IHover | undefined;
331
331
  /**
332
332
  * @param {string} uri
333
- * @param {number} offset
333
+ * @param {IPosition} position
334
334
  * @returns {ISignatureHelp | undefined}
335
335
  */
336
- get_signature_help(uri: string, offset: number): ISignatureHelp | undefined;
336
+ get_signature_help(uri: string, position: IPosition): ISignatureHelp | undefined;
337
337
  /**
338
338
  * @param {string} uri
339
- * @param {number} offset
339
+ * @param {IPosition} position
340
340
  * @param {string} new_name
341
341
  * @returns {IWorkspaceEdit}
342
342
  */
343
- get_rename(uri: string, offset: number, new_name: string): IWorkspaceEdit;
343
+ get_rename(uri: string, position: IPosition, new_name: string): IWorkspaceEdit;
344
344
  /**
345
345
  * @param {string} uri
346
- * @param {number} offset
346
+ * @param {IPosition} position
347
347
  * @returns {ITextEdit | undefined}
348
348
  */
349
- prepare_rename(uri: string, offset: number): ITextEdit | undefined;
349
+ prepare_rename(uri: string, position: IPosition): ITextEdit | undefined;
350
350
  }
351
351
  /**
352
352
  * a minimal implementation for interacting with async JS filesystem callbacks to
@@ -736,38 +736,38 @@ export class LanguageService {
736
736
  }
737
737
  /**
738
738
  * @param {string} uri
739
- * @param {number} offset
739
+ * @param {IPosition} position
740
740
  * @returns {ICompletionList}
741
741
  */
742
- get_completions(uri, offset) {
742
+ get_completions(uri, position) {
743
743
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
744
744
  const len0 = WASM_VECTOR_LEN;
745
- const ret = wasm.languageservice_get_completions(this.__wbg_ptr, ptr0, len0, offset);
745
+ const ret = wasm.languageservice_get_completions(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
746
746
  return takeObject(ret);
747
747
  }
748
748
  /**
749
749
  * @param {string} uri
750
- * @param {number} offset
750
+ * @param {IPosition} position
751
751
  * @returns {ILocation | undefined}
752
752
  */
753
- get_definition(uri, offset) {
753
+ get_definition(uri, position) {
754
754
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
755
755
  const len0 = WASM_VECTOR_LEN;
756
- const ret = wasm.languageservice_get_definition(this.__wbg_ptr, ptr0, len0, offset);
756
+ const ret = wasm.languageservice_get_definition(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
757
757
  return takeObject(ret);
758
758
  }
759
759
  /**
760
760
  * @param {string} uri
761
- * @param {number} offset
761
+ * @param {IPosition} position
762
762
  * @param {boolean} include_declaration
763
763
  * @returns {(ILocation)[]}
764
764
  */
765
- get_references(uri, offset, include_declaration) {
765
+ get_references(uri, position, include_declaration) {
766
766
  try {
767
767
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
768
768
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
769
769
  const len0 = WASM_VECTOR_LEN;
770
- wasm.languageservice_get_references(retptr, this.__wbg_ptr, ptr0, len0, offset, include_declaration);
770
+ wasm.languageservice_get_references(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(position), include_declaration);
771
771
  var r0 = getInt32Memory0()[retptr / 4 + 0];
772
772
  var r1 = getInt32Memory0()[retptr / 4 + 1];
773
773
  var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
@@ -779,49 +779,49 @@ export class LanguageService {
779
779
  }
780
780
  /**
781
781
  * @param {string} uri
782
- * @param {number} offset
782
+ * @param {IPosition} position
783
783
  * @returns {IHover | undefined}
784
784
  */
785
- get_hover(uri, offset) {
785
+ get_hover(uri, position) {
786
786
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
787
787
  const len0 = WASM_VECTOR_LEN;
788
- const ret = wasm.languageservice_get_hover(this.__wbg_ptr, ptr0, len0, offset);
788
+ const ret = wasm.languageservice_get_hover(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
789
789
  return takeObject(ret);
790
790
  }
791
791
  /**
792
792
  * @param {string} uri
793
- * @param {number} offset
793
+ * @param {IPosition} position
794
794
  * @returns {ISignatureHelp | undefined}
795
795
  */
796
- get_signature_help(uri, offset) {
796
+ get_signature_help(uri, position) {
797
797
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
798
798
  const len0 = WASM_VECTOR_LEN;
799
- const ret = wasm.languageservice_get_signature_help(this.__wbg_ptr, ptr0, len0, offset);
799
+ const ret = wasm.languageservice_get_signature_help(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
800
800
  return takeObject(ret);
801
801
  }
802
802
  /**
803
803
  * @param {string} uri
804
- * @param {number} offset
804
+ * @param {IPosition} position
805
805
  * @param {string} new_name
806
806
  * @returns {IWorkspaceEdit}
807
807
  */
808
- get_rename(uri, offset, new_name) {
808
+ get_rename(uri, position, new_name) {
809
809
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
810
810
  const len0 = WASM_VECTOR_LEN;
811
811
  const ptr1 = passStringToWasm0(new_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
812
812
  const len1 = WASM_VECTOR_LEN;
813
- const ret = wasm.languageservice_get_rename(this.__wbg_ptr, ptr0, len0, offset, ptr1, len1);
813
+ const ret = wasm.languageservice_get_rename(this.__wbg_ptr, ptr0, len0, addHeapObject(position), ptr1, len1);
814
814
  return takeObject(ret);
815
815
  }
816
816
  /**
817
817
  * @param {string} uri
818
- * @param {number} offset
818
+ * @param {IPosition} position
819
819
  * @returns {ITextEdit | undefined}
820
820
  */
821
- prepare_rename(uri, offset) {
821
+ prepare_rename(uri, position) {
822
822
  const ptr0 = passStringToWasm0(uri, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
823
823
  const len0 = WASM_VECTOR_LEN;
824
- const ret = wasm.languageservice_prepare_rename(this.__wbg_ptr, ptr0, len0, offset);
824
+ const ret = wasm.languageservice_prepare_rename(this.__wbg_ptr, ptr0, len0, addHeapObject(position));
825
825
  return takeObject(ret);
826
826
  }
827
827
  }
@@ -1217,8 +1217,8 @@ function __wbg_get_imports() {
1217
1217
  const ret = wasm.memory;
1218
1218
  return addHeapObject(ret);
1219
1219
  };
1220
- imports.wbg.__wbindgen_closure_wrapper593 = function(arg0, arg1, arg2) {
1221
- const ret = makeMutClosure(arg0, arg1, 221, __wbg_adapter_46);
1220
+ imports.wbg.__wbindgen_closure_wrapper598 = function(arg0, arg1, arg2) {
1221
+ const ret = makeMutClosure(arg0, arg1, 219, __wbg_adapter_46);
1222
1222
  return addHeapObject(ret);
1223
1223
  };
1224
1224
 
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qsharp-lang",
3
3
  "description": "qsharp language package for quantum development",
4
- "version": "1.0.34-dev",
4
+ "version": "1.1.0-dev",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=16.17.0"
package/ux/data.ts CHANGED
@@ -10,7 +10,6 @@ export type ReData = {
10
10
  tfactory: any;
11
11
  errorBudget: any;
12
12
  logicalCounts: any;
13
- new: boolean;
14
13
  frontierEntries: FrontierEntry[];
15
14
  };
16
15
 
@@ -23,7 +22,6 @@ export type SingleEstimateResult = {
23
22
  tfactory: any;
24
23
  errorBudget: any;
25
24
  logicalCounts: any;
26
- new: boolean;
27
25
  };
28
26
 
29
27
  export type FrontierEntry = {
@@ -62,7 +60,6 @@ export function CreateSingleEstimateResult(
62
60
  tfactory: entry.tfactory,
63
61
  errorBudget: entry.errorBudget,
64
62
  logicalCounts: input.logicalCounts,
65
- new: input.new,
66
63
  };
67
64
  }
68
65
  }