forked from durs/node-activex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
54 lines (43 loc) · 1.46 KB
/
index.d.ts
File metadata and controls
54 lines (43 loc) · 1.46 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
export class Object {
constructor(id: string, options?: ActiveXObjectOptions);
// Define properties typically found on COM objects
__id?: string;
__value?: any;
__type?: any[];
__methods?: string[];
__vars?: string[];
// Define general method signatures if any known
[key: string]: any;
}
/** @deprecated Use `ActiveXObjectOptions` instead. */
export interface ActiveXOptions extends ActiveXObjectOptions {}
export class Variant {
constructor(value?: any, type?: VariantType);
assign(value: any): void;
cast(type: VariantType): void;
clear(): void;
valueOf(): any;
}
export type VariantType =
| 'int' | 'uint' | 'int8' | 'char' | 'uint8' | 'uchar' | 'byte'
| 'int16' | 'short' | 'uint16' | 'ushort'
| 'int32' | 'uint32'
| 'int64' | 'long' | 'uint64' | 'ulong'
| 'currency' | 'float' | 'double' | 'string'
| 'date' | 'decimal' | 'variant' | 'null' | 'empty'
| 'byref' | 'pbyref';
export function cast(value: any, type: VariantType): any;
// Utility function to release COM objects
export function release(...objects: any[]): void;
declare global {
function ActiveXObject(id: string, options?: ActiveXObjectOptions): any;
function ActiveXObject(obj: Record<string, any>): any;
interface ActiveXObjectOptions {
/** Allow activating existing object instance. */
activate?: boolean;
/** Allow using the name of the file in the ROT. **/
getobject?: boolean;
/** Allow using type information. */
type?: boolean;
}
}