-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsProvider.d.ts
More file actions
955 lines (843 loc) · 48.1 KB
/
Copy pathJsProvider.d.ts
File metadata and controls
955 lines (843 loc) · 48.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
/*--------------------------------------------------------------------------
* Copyright 2017 Microsoft Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
* to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*
*
* TypeScript Definition For Intellisense on Core JavaScript script provider
* and data model concepts.
*
* Note that the TypeScript definitions here do not account for anything which
* is added by debugger extensions. These are only core concepts of the JavaScript
* provider or aspects of the data model which are fixed by specification.
*-------------------------------------------------------------------------*/
interface frameInterface
{
/**
* The list of (non parameter) local variables in scope at this location in the call stack. Each such local is available
* as a property of this object.
*/
LocalVariables: any;
/**
* The list of parameters to the call at this location in the call stack. Each such parameter is available
* as a property of this object.
*/
Parameters: any;
}
interface stackInterface
{
/**
* An iterable of individual frames within the call stack
*/
Frames: frameInterface[];
}
interface threadInterface
{
/**
* The thread identifier (TID) for the thread
*/
Id: number;
Stack: stackInterface;
}
interface moduleInterface
{
/**
* The base address of the module within the address space of a process
*/
BaseAddress: host.Int64;
/**
* The name of the module
*/
Name: string;
/**
* The size of the module in bytes
*/
Size: host.Int64;
}
interface processInterface
{
/**
* An iterable representing all the threads in the process
*/
Threads: threadInterface[];
/**
* The name of the process
*/
Name: string;
/**
* The process identifier (PID) for the process
*/
Id: number;
/**
* An iterable representing all the modules loaded into the address space of the process
*/
Modules: moduleInterface[];
}
interface sessionInterface
{
Processes: processInterface[];
}
interface debuggerInterface
{
Sessions: sessionInterface[];
}
interface namespaceInterface
{
Debugger: debuggerInterface;
}
interface baseClassInterface
{
/**
* The name of the base class.
*/
name: string;
/**
* The offset of the base class within its parent class.
*/
offset: host.Int64;
/**
* A type object representing the type of the base class.
*/
type: typeObjectInterface;
}
interface fieldInterface
{
/**
* The name of the field.
*/
name: string;
/**
* A type object representing the type of the field.
*/
type: typeObjectInterface;
/**
* Indicates where the field is stored (as member data which has an offset, as static data which has a location, or
* as a constant which has a value).
*/
locationKind: string;
/**
* For fields which are member data, this returns the field's offset into the type which contains it.
*/
offset: host.Int64;
/**
* For fields which are static data, this returns a location of the static data.
*/
location: any;
/**
* For fields which are constant values, this returns the constant value.
*/
value: any;
}
interface bitFieldInterface
{
/**
* The bit position of the least significant bit of the bitfield.
*/
lsb: number;
/**
* The length (in bits) of the bitfield.
*/
length: number;
}
interface typeObjectInterface
{
/**
* The name of the type
*/
name: string;
/**
* The module in which the type is contained
*/
containingModule: moduleInterface;
/**
* The size of the type in bytes
*/
size: host.Int64;
/**
* The kind of type (e.g.: a pointer, a user defined type, an array, etc...)
*/
typeKind: string;
/**
* The type from which this type is based. This does not represent C++ inheritence. For a pointer type, this is the
* type of the thing pointed to. For an array type, this is the type contained in the array.
*/
baseType: typeObjectInterface;
/**
* An object which represents the data fields within the type. Each field is a property within the returned object.
*/
fields: any;
/**
* An array of objects which represents all of the base classes of the given type. Note that if there are no base
* classes, an empty array will be returned.
*/
baseClasses: baseClassInterface[];
/**
* For types which are functions, this returns a type object representing the return type of the function.
*/
functionReturnType: typeObjectInterface;
/**
* For types which are functions, this returns an array of type objects representing the parameter types of the function.
*/
functionParameterTypes: typeObjectInterface[];
/**
* For types which are functions, this returns the calling convention of the function.
*/
functionCallingConvention: string;
/**
* For types which are pointers, this returns the kind of pointer (e.g.: a standard '*', a reference '&', etc...)
*/
pointerKind: string;
/**
* For types which are pointer-to-member, this returns a type object representing the member type.
*/
memberType: typeObjectInterface;
/**
* This indicates whether the type is a generic (e.g.: template) type.
*/
isGeneric: boolean;
/**
* For types which are generic, this returns the generic arguments. Such can be type objects or other values.
*/
genericArguments: any[];
/**
* This returns whether the type is a bitfield.
*/
isBitField: boolean;
/**
* This returns the positional layout of a bitfield type.
*/
bitFieldPositions: bitFieldInterface;
/**
* Creates a new type object which is typed as a pointer to this type object.
*
* @param pointerKind An optional argument indicating what kind of pointer to create. This may be a string as returned from the pointerKind property or one of the constant values in host.typeSystem.pointerKind
* @return A new type object which is typed as a pointer to this type object.
*/
createPointerTo(pointerKind?: any): typeObjectInterface;
/**
* Creates a new type object which is an array of this type object.
*
* @param arrayDimensions One or more host.typeSystem.arrayDimension objects describing the dimensionality of the array.
* @return A new type object which is an array of this type object.
*/
createArrayOf(...arrayDimensions: host.typeSystem.arrayDimension[]);
}
interface symbolInformationInterface
{
/**
* The name of the queried symbol
*/
name: string;
/**
* The address of the queried symbol
*/
address: host.Int64;
/**
* A type object representing the type of the queried symbol. If the queried symbol does not have
* a representable type, this may be null
*/
type: typeObjectInterface;
/**
* The value of the queried symbol as would be returned from a call to host.getModuleContainingSymbol.
*/
value: any;
}
declare namespace host {
/**
* Creates a new pointer object of the given type at the given address.
*
* @param address The address (or location) that the pointer is at
* @param moduleName The name of the module which contains the type of the pointer
* @param typeName The type name of the pointer
* @param contextInheritor An optional argument which supplies the context in which the address is valid
* @return A pointer object of the specified type
*/
function createPointerObject(address: any, moduleName: string, typeName: string, contextInheritor?: any): any;
/**
* Creates a new pointer object of the given type at the given address.
*
* @param address The address (or location) that the pointer is at
* @param moduleName The name of the module which contains the type of the pointer
* @param typeObject An instance of a type object representing the type of the pointer
* @param contextInheritor An optional argument which supplies the context in which the address is valid
* @return A pointer object of the specified type
*/
function createPointerObject(address: any, typeObject: any, contextInheritor?: any): any;
/**
* Creates a new object of the given type at the given location (or address)
*
* @param location The location (or address) that the object is stored at in target memory
* @param moduleName The name of the module which contains the type of the object
* @param typeName The type of the object
* @param contextInheritor An optional argument which supplies the context in which the location is valid
* @return An object of the specified type
*/
function createTypedObject(location: any, moduleName: string, typeName: string, contextInheritor?: any): any;
/**
* Creates a new object of the given type at the given location (or address)
*
* @param location The location (or address) that the object is stored at in target memory
* @param typeObject An instance of a type object representing the type of the object to create
* @param contextInheritor An optional argument which supplies the context in which the location is valid
* @return An object of the specified type
*/
function createTypedObject(location: any, typeObject: any, contextInheritor?: any): any;
/**
* Contains the object representing the current session of the debugger (Which target, dump, etc...) is being debugged
*/
var currentSession: sessionInterface;
/**
* Contains the object representing the current process of the debugger
*/
var currentProcess: processInterface;
/**
* Contains the object representing the current thread of the debugger
*/
var currentThread : threadInterface;
/**
* Calls into the debug host to evaluate an expression using the language of the debug target only. If the optional
* contextInheritor argument is supplied, the expression will be evaluated in the context (e.g.: address space
* and debug target) of the argument; otherwise, it will be evaluated in the current context of the debugger.
*
* @param expression The expression to be evaluated. Such expression may utilize only constructs of the language being debugged
* @param contextInheritor An optional argument which supplies the context in which the expression is evaluated
* @return The result of the expression evaluation
*/
function evaluateExpression(expression: string, contextInheritor?: any): any;
/**
* Calls into the debug host to evaluate an expression using the language of the debug target only. The context argument
* indicates the implicit *this* pointer the utilize for the evaluation. The expression will be evaluated in the context
* (e.g.: address space and debug target) as well as the scope of the context argument.
*
* @param context The context (and scope) in which the expression will be evaluated. This will be the implicit *this* pointer
* @param expression The expression to be evaluated. Such expression may utilize only constructs of the language being debugged
* @return The result of the expression evaluation
*/
function evaluateExpressionInContext(context: any, expression: string): any;
/**
* Returns an object for a global symbol within a particular module. This method does not and cannot work with modules which
* have stripped symbols.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol to return an object for
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are valid
* @return An object representing the global symbol
*/
function getModuleSymbol(moduleName: string, symbolName: string, contextInheritor?: any): any;
/**
* Returns an object for a global symbol within a particular module.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol to return an object for
* @param typeName An optional argument which supplies the name of the type of the global symbol. If this argument is not specified, the type name is picked up from the symbols. This argument is mandatory for working on public stripped symbols
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are valid
* @return An object representing the global symbol
*/
function getModuleSymbol(moduleName: string, symbolName: string, typeName?: string, contextInheritor?: any): any;
/**
* Returns the address of a global symbol within a particular module.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol to return the address of
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are valid
* @return The address of the global symbol
*/
function getModuleSymbolAddress(moduleName: string, symbolName: string, contextInheritor?: any): Int64;
/**
* Returns the address of a global symbol within a particular module.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol to return the address of
* @param typeName An optional argument which supplies the name of the type of the global symbol. If this argument is not specified, the type name is picked up from the symbols. This argument is mandatory for working on public stripped symbols
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are valid
* @return The address of the global symbol
*/
function getModuleSymbolAddress(moduleName: string, symbolName: stirng, typeName?: string, contextInheritor?: any): Int64;
/**
* Returns an object for a global symbol within a module. The symbol returned is the one contained at the given location (or address). This method does not and cannot work with modules which have stripped symbols.
*
* @param location The location (or address) that the symbol is stored at in target memory
* @return An object representing the global symbol
*/
function getModuleContainingSymbol(location: any, contextInheritor?: any): any;
/**
* Returns an information object expressing properties of a global symbol within a module. The object returned
* represents the symbol contained at the given location (or address). This method may only partially work
* with modules which have stripped symbols.
*
* @param location The location (or address) that the symbol is stored at in target memory
* @return An information object expressing properties of the global symbol
*/
function getModuleContainingSymbolInformation(location: any, contextInheritor?: any): symbolInformationInterface;
/**
* Sets a global symbol to the specified value. This method does not and cannot work with modules which have
* have stripped symbols.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol for which to set a value
* @param value The value to assign to the symbol
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are value
*/
function setModuleSymbol(moduleName: string, symbolName: string, value: any, contextInheritor?: any): any;
/**
* Sets a global symbol to the specified value.
*
* @param moduleName The name of the module in which the symbol is located
* @param symbolName The name of the symbol for which to set a value
* @param value The value to assign to the symbol
* @param typeName An optional argument which supplies the name of the type of the global symbol. If this argument is not specified, the type name is picked up from the symbols. This argument is mandatory for working on public stripped symbols
* @param contextInheritor An optional argument which supplies the context in which the module and symbol names are value
*/
function setModuleSymbol(moduleName: string, symbolName: string, value: any, typeName?: string, contextInheritor?: any): any;
/**
* Returns a type object for a given type within a particular module.
*
* @param moduleName The name of the module in which the type is located
* @param typeName The name of the type to find within the given module
* @param contextInheritor An optional argument which supplies the context in which the module and type names are valid
* @return An object representing the type
*/
function getModuleType(moduleName: string, typeName: string, contextInheritor?: any): typeObjectInterface;
/**
* Returns the data model which was registered against a given name. Note that it is perfectly legal to call this against
* a name which is not yet registered. Doing so will create a stub for that name and manipulations of the stub will be made to the actual
* object upon registration
*
* @param modelName The name of the data model to return
* @return The data model registered against the given name
*/
function getNamedModel(modelName: string): any;
/**
* An object which represents a value with a specified set of indicies. An iterator which returns values which can be indexed by value through the data model
* must return instances of this object instead.
*/
class indexedValue
{
/**
* Constructs an object represnting a value with a specified set of indicies.
*
* @param value The value
* @param indicies The index to the value in a container. This must be an array and can contain more than one element for multi-dimensional containers
*/
constructor(value: any, indicies: any[]);
}
/**
* A class which represents a 64-bit signed or unsigned number.
*/
class Int64 {
/**
* Constructs a new 64-bit signed or unsigned number. If the highValue argument is supplied, the 64-bit value is a combination
* of a lower 32-bits supplied by the value argument and a higher 32-bits supplied by the highValue argument.
*
* @param value The value to place in the 64-bit quantity
* @param highValue If present, the value to place in the upper 64-bits of the returned 64-bit quantity. If this argument is present, value must be an unsigned 32-bit quantity
* @return A 64-bit number
*/
constructor(value: number, highValue?: number);
}
/**
* An object representing a modification of the object model of the debugger. This links together a JavaScript class (or prototype) with a data model. The JavaScript
* class (or prototype) becomes a parent data model (e.g.: similar to a prototype) to the data model registered under the supplied name.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class namedModelParent
{
/**
* Constructs a new registration record representing a link between a JavaScript class (or prototype) and a data model registered under the supplied name.
*
* @param object A JavaScript class or prototype which will become a parent of the data model with the specified name
* @param modelName The name of a data model for which to add the JavaScript class or prototype as a parent
*/
constructor(object: any, modelName: string);
}
/**
* An object representing a modification of the object model of the debugger. This registers a JavaScript class (or prototype) as a data model under a specified name.
* This allows other extensions to find this data model and extend or alter it from another script or another language.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class namedModelRegistration
{
/**
* Constructs a new registration record representing the registration of a JavaScript class (or prototype) as a data model under a given name.
*
* @param object A JavaScript class or prototype which will become a data model registered under the supplied name
* @param modelName The name under which the JavaScript class or prototype will be registered
*/
constructor(object: any, modelName: string);
}
/**
* An object representing a modification of the object model of the debugger. This registers a namespace in the data model and makes a JavaScript class (or prototype) an extension of that namespace.
* This allows a shared ownership of common namespaces with other scripts or extensions.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class namespacePropertyParent
{
/**
* Constructs a new registration record representing the addition of a namespace and the extension of that namespace by a JavaScript class (or prototype).
*
* @param object A JavaScript class or prototype which will become the extension of the given namespace
* @param modelName The name of a data model which will have a new property added as a namespace
* @param subNamespaceModelName The name under which the namespace will be registered for extensibility
* @param subNamespaceAccessName The property name which will be added to the model given by modelName in order to access the namespace
*/
constructor(object: any, modelName: string, subNamespaceModelName: string, subNamespaceAccessName: string);
}
/**
* An object representing a modification of the object model of the debugger which is optional. This class wraps another registration record class and makes it optional. If the registration fails, the script still loads successfully.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class optionalRecord
{
/**
* Constructs a new optional registration record. The inner record given by the registrationRecord argument is made optional via this record.
*
* @param registrationRecord The registration record to make optional
*/
constructor(registrationRecord: any);
}
/**
* Provides access to the namespace of the debug target.
*/
var namespace: namespaceInterface;
/**
* This registers a JavaScript class (or prototype) as a data model under the given name. Such a registration allows the class (or prototype) to
* be located and extended by other scripts or debugger extensions. Note that a script should prefer to return a namedModelRegistration object
* from its initializeScript method rather than calling this method imperatively. Any script which makes changes imperatively with this method
* is required to have an uninitializeScript method to clean up.
*
* @param object The JavaScript class or prototype which will become a data model registered under the supplied name
* @param modelName The name under which the JavaScript class or prototype will be registered
*/
function registerNamedModel(object: any, modelName: string);
/**
* This registers a JavaScript class (or prototype) as an extension data model for a native type as indicated by the supplied type signature. Note
* that a script should prefer to return a typeSignatureExtension object from its initializeScript method rather than doing this imperatively. Any
* script which makes changes imperatively with this method is required to have an uninitializeScript method to clean up.
*
* @param object The JavaScript class or prototype which will become an extension data model for the given type
* @param typeSignature The type signature describing the types for which the extension data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are extended
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are extended
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are extended
*/
function registerExtensionForTypeSignature(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
/**
* This registers a JavaScript class (or prototype) as an extension data model for a native type as indicated by the supplied type signature. Note
* that a script should prefer to return a typeSignatureRegistration object from its initializeScript method rather than doing this imperatively. Any
* script which makes changes imperatively with this method is required to have an uninitializeScript method to clean up.
*
* @param object The JavaScript class or prototype which will become the canonical data model (visualizer) for the given type
* @param typeSignature The type signature describing the types for which the data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are visualized
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are visualized
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are visualized
*/
function registerPrototypeForTypeSignature(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
/**
* This method acts similarly to the standard JavaScript parseInt method except that it returns a library Int64 type instead. If a radix is supplied,
* the parse will occur in either base 2, 8, 10, or 16 as indicated.
*
* @param string The string to parse
* @param radix The radix to utilize the parse the given number
* @return An Int64 object representing the parsed 64-bit quantity.
*/
function parseInt64(string: string, radix?: number): Int64;
/**
* An object representing a modification of the object model of the debugger. This links together a JavaScript class (or prototype) with a native type
* as indicated by a type signature. The JavaScript class (or prototype) becomes an extension data model (e.g.: similar to a prototype) to the
* native type as indicated by the supplied type signature.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class typeSignatureExtension
{
/**
* Constructs a new registration record representing a link between a JavaScript class (or prototype) and an extension for a native type as indicated by a type signature.
*
* @param object A JavaScript class or prototype which will become an extension data model for the native type as indicated by the type signature
* @param typeSignature The type signature describing the types for which the data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are extended
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are extended
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are extended
*/
constructor(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
}
/**
* An object representing a modification of the object model of the debugger. This links together a JavaScript class (or prototype) with a native type
* as indicated by a type signature. The JavaScript class (or prototype) becomes the canonical data model (visualizer) for the native type as indicated
* by the supplied type signature.
*
* An instance of this object can be returned in the array of records returned from the initializeScript method.
*/
class typeSignatureRegistration
{
/**
* Constructs a new registration record representing a link between a JavaScript class (or prototype) and a canonical data model (visualizer) for a native type as indicated by a type signature.
*
* @param object A JavaScript class or prototype which will become the canonical data model (visualizer) for the native type as indicated by the type signature
* @param typeSignature The type signature describing the types for which the data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are visualized
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are visualized
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are visualized
*/
constructor(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
}
/**
* This unregisters a data model from lookup by the given name undoing any operation performed by a call to the registerNamedModel method.
*
* @param modelName The data model registered by this name is unregistered
*/
function unregisterNamedModel(modelName: string);
/**
* This unregisters a JavaScript class (or prototype) from being an extension data model for a native type as given by the supplied type
* signature. It is the logical undo of a call to the registerExtensionForTypeSignature method.
*
* @param object A JavaScript class or prototype which will be unregistered as the canonical data model (visualizer) for the native type as indicated by the type signature
* @param typeSignature The type signature describing the types for which the data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are unregistered
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are unregistered
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are unregistered
*/
function unregisterExtensionForTypeSignature(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
/**
* This unregisters a JavaScript class (or prototype) from being an extension data model for a native type as given by the supplied type
* signature. It is the logical undo of a call to the registerPrototypeForTypeSignature method.
*
* @param object A JavaScript class or prototype which will be unregistered as an extension data model for the native type as indicated by the type signature
* @param typeSignature The type signature describing the types for which the data model applies. The type signature syntax is language specific. For C/C++, this follows NatVis syntax
* @param moduleName An optional argument supplying a constraint for the type signature. If supplied, only types which are in the module indicated by this name are unregistered
* @param minVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions of at least this value are unregistered
* @param maxVersion An optional argument supplying a constraint for the type signature. If supplied (in x.y.z.a format), only module versions up to this value are unregistered
*/
function unregisterPrototypeForTypeSignature(object: any, typeSignature: string, moduleName?: string, minVersion?: string, maxVersion?: string);
/**
* Sets the supported JSProvider API version by the script. If not specified it uses the default of version 1.0.
*
* @param majorVersion The major API version supported by the script.
* @param minorVersion An optional minor API version supported by the script.
*/
function apiVersionSupport(majorVersion: number, minorVersion?: number): any;
/**
* Creates an instance of a data model object. The model needs to have IConstructableConcept.
*
* @param model The model or the model name to be constructed.
* @param args An optional list of arguments to use to initialize the new model instance.
*/
function createInstance(model: any, ...args: any[]): any;
/**
* Creates a function alias
*
* @param object The function to be associated with the alias name aliasName.
* @param aliasName The function alias name.
*/
function functionAlias(object: any, aliasName: string): any;
/**
* Sets the resource file name to be used when retrieving data via resourceLookup.
* The current format of the resource file is as follows (in any order):
* <propertyName1> "string value1"
* <propertyName2> "string value2"
* <propertyName3> DmDoc "fileName"
* etc.
*
* @param fileName The name of the resource. It can be an absolute file path or a script relative file name (only if the script is loaded from a file)
*/
function resourceFileName(fileName: string): any;
/**
* Returns an object which is loaded from the resource file. The current resource types are:
* - strings
* - data model documentation resource files referenced from the resource.
*
* @param resourcePropertyName The name of property in the resource (file).
* @param secondaryPropertyName The name of the property in the documentation resource file. It is an optional parameter (currently used only for the documentation resources).
*/
function resourceLookup(resourcePropertyName: string, secondaryPropertyName?: string): any;
/**
* A sub-namespace of the host which deals with diagnostic functionality
*/
namespace diagnostics
{
/**
* This provides printf style debugging to a script. At present, output from debugLog is routed to the output console of the debugger. At a later
* point in time, it will be routed to a separate channel for the UI. This method should never be used as a means of explicit console output.
*
* @param args A list of arguments to convert to string and route to the diagnostic channel.
*/
function debugLog(...args: any[]);
/**
* When set, indicates that all JavaScript exceptions that escape the script context should be logged to the debug log. This can be set
* at any point during script execution.
*/
var logUnhandledExceptions: boolean;
/**
* This causes the debug target to break.
*/
function debugBreak();
/**
* This causes a garbage collection of the given object to be logged to the debugLog channel.
*
* @param object The object for which to log garbage collection
*/
function logObjectCollection(object: any);
}
namespace memory
{
/**
* This reads a raw array of values from the address space of the debug target and places a typed array on top of the view of its memory.
*
* @param location The location (or address) that the object is stored at in target memory
* @param numElements The number of distinct elements to read from target memory. This will be the size of the returned array
* @param elementSize The size of each element to read from target memory. If this argument is not specified, the call will read single byte elements
* @param isSigned Indicates whether the elements being read from target memory are signed or not. If this argument is not specified, the call will read unsigned values
* @param contextInheritor An optional argument which supplies the context in which to read target memory
* @return A typed array of 8, 16, 32, or 64 bit signed or unsigned values as indicated by the arguments passed to the method
*/
function readMemoryValues(location: any, numElements: number, elementSize?: number, isSigned?: number, contextInheritor?: any): any;
/**
* This writes a value or an array of values to the address space of the debug target.
*
* @param location The location (or address) that the object will be stored in target memory
* @param numElements The number of distinct elements to write to target memory. The element array must be at least this large
* @param elementArray An array of elements to convert and write to target memory. If numElements is one, this may be a single value instead of an array
* @param elementSize The size of each element to write to target memory. If this argument is not specified, the call will write single byte elements. If an element in the elementArray does not naturally fit into this byte size (e.g.: a value above 255 for an unsigned single byte), an exception will be thrown
* @param isSigned Indicates whether the elements being written to target memory are signed or not. If this argument is not specified, the call will write unsigned values
* @param contextInheritor An optional argument which supplies the context in which to write target memory
*/
function writeMemoryValues(location: any, numElements: number, elementArray: any, elementSize?: number, isSigned?: number, contextInheritor?: any);
/**
* This reads a narrow (current code page) string from the address space of the debug target, converts it to UTF-16 and returns the result as a
* JavaScript string.
*
* @param location The location of the string to read. This argument can also be an address (a 64-bit value), or a native char*
* @param contextInheritor An optional argument which supplies the context in which to read target memory
* @return A string read from target memory
*/
function readString(location: any, contextInheritor?: any): string;
/**
* This reads a narrow (current code page) string from the address space of the debug target, converts it to UTF-16 and returns the result as a
* JavaScript string.
*
* @param location The location of the string to read. This argument can also be an address (a 64-bit value), or a native char*
* @param length An optional length argument which supplies the length of the string to read. If not specified, the method will read until a null terminator
* @param contextInheritor An optional argument which supplies the context in which to read target memory
* @return A string read from target memory
*/
function readString(location: any, length?: number, contextInheritor?: any): string;
/**
* This reads a wide (UTF-16) string from the address space of the debug target and returns the result as a
* JavaScript string.
*
* @param location The location of the string to read. This argument can also be an address (a 64-bit value), or a native char*
* @param contextInheritor An optional argument which supplies the context in which to read target memory
* @return A string read from target memory
*/
function readWideString(location: any, contextInheritor?: any): string;
/**
* This reads a wide (UTF-16) string from the address space of the debug target and returns the result as a
* JavaScript string.
*
* @param location The location of the string to read. This argument can also be an address (a 64-bit value), or a native char*
* @param length An optional length argument which supplies the length of the string to read. If not specified, the method will read until a null terminator
* @param contextInheritor An optional argument which supplies the context in which to read target memory
* @return A string read from target memory
*/
function readWideString(location: any, length?: number, contextInheritor?: any): string;
/**
* This function forces a garbage collection.
*/
function collectGarbage();
}
namespace typeSystem
{
/**
* An object which represents a single dimension within a (potentially) multi-dimensional array. Dimensions are described by three
* key values: the lowerBound, the length, and the stride.
*/
class arrayDimension
{
/**
* Constructs an object represnting a value with a specified set of indicies.
*
* @param lowerBound Defines the lower bound of the array dimension. Most commonly, this is zero indicating that the indexes in this dimension are zero based.
* @param length Defines the length of the array dimension. The range of valid indicies of this dimension are defined by the half open set [lowerBound, lowerBound + length)
* @param stride Defines the stride of the array dimension. This indicates the number of bytes of memory in between one index of this dimension and the next index of this dimension. For the typical single dimensional array, this is most often the size of the base type of the array. For multi-dimensional arrays, this can be used to indicate whether the array is row major or column major. It can also be used to indicate that there is padding between array elements, rows, columns, etc...
*/
constructor(lowerBound: host.Int64, length: host.Int64, stride: host.Int64);
/**
* Defines the lower bound of the array dimension. Most commonly, this is zero indicating that the indexes in this dimension
* are zero based.
*/
lowerBound: host.Int64;
/**
* Defines the length of the array dimension. The range of valid Indicies of this dimension are defined by the
* half open set [lowerBound, lowerBound + length)
*/
length: host.Int64;
/**
* Defines the stride of the array dimension. This indicates the number of bytes of memory in between one index of this
* dimension and the next index of this dimension. For the typical single dimensional array, this is most often the size
* of the base type of the array. For multi-dimensional arrays, this can be used to indicate whether the array is row major
* or column major. It can also be used to indicate that there is padding between array elements, rows, columns, etc...
*/
stride: host.Int64;
}
namespace pointerKind
{
/**
* Represents a standard pointer (*)
*/
var standard: number;
/**
* Represents a pointer which is in reality a reference (&)
*/
var reference: number;
/**
* Represents a pointer which is in reality an r-value reference (&&)
*/
var rValueReference: number;
/**
* Represents a pointer which is in reality a C++/CX hat (^)
*/
var cxHat : number;
}
/**
* This applies custom marshaling to an object as it exits JavaScript. This function can be used to ensure that a JavaScript number exits JavaScript as a particular native enum type, for example.
*
* @param object The object to which to apply custom marshaling
* @param moduleName The name of the module containing the type to use for custom marshaling
* @param typeName The name of the type to marshal the object out of JavaScript as
* @return A library object representing the custom marshaling.
*/
function marshalAs(object: any, moduleName: string, typeName: string): any;
/**
* An object which represents a value with a specified set of metadata attached. Functions which are accessible outside of JavaScript can associate metadata with a return value by means of returning an instance of this object.
*/
class valueWithMetadata
{
/**
* Constructs an object representing a value with a specified set of metadata.
*
* @param value The value
* @param metadataDescriptor A object containing metadata keys and values as object properties
*/
constructor(value: any, metadataDescriptor: any);
}
}