node-api-dotnet 0.3.1 → 0.3.2
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/index.d.ts +11 -24
- package/linux-x64/Microsoft.JavaScript.NodeApi.node +0 -0
- package/net472/Microsoft.JavaScript.NodeApi.DotNetHost.dll +0 -0
- package/net472/Microsoft.JavaScript.NodeApi.dll +0 -0
- package/net6.0/Microsoft.JavaScript.NodeApi.DotNetHost.dll +0 -0
- package/net6.0/Microsoft.JavaScript.NodeApi.dll +0 -0
- package/net7.0/Microsoft.JavaScript.NodeApi.DotNetHost.dll +0 -0
- package/net7.0/Microsoft.JavaScript.NodeApi.dll +0 -0
- package/osx-arm64/Microsoft.JavaScript.NodeApi.node +0 -0
- package/osx-x64/Microsoft.JavaScript.NodeApi.node +0 -0
- package/package.json +1 -1
- package/win-arm64/Microsoft.JavaScript.NodeApi.node +0 -0
- package/win-x64/Microsoft.JavaScript.NodeApi.node +0 -0
package/index.d.ts
CHANGED
|
@@ -6,18 +6,6 @@
|
|
|
6
6
|
// This explicit module declaration enables module members to be merged with imported namespaces.
|
|
7
7
|
declare module 'node-api-dotnet' {
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* A .NET assembly that was loaded dynamically by the .NET host. Types within the assembly
|
|
11
|
-
* can be accessed via properties on the assembly object.
|
|
12
|
-
*/
|
|
13
|
-
export interface Assembly {
|
|
14
|
-
/**
|
|
15
|
-
* Gets a type within the assembly.
|
|
16
|
-
* @param typeName Either a type full name or (if unambiguous) simple type name.
|
|
17
|
-
*/
|
|
18
|
-
[typeName: string]: any;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
9
|
/**
|
|
22
10
|
* Loads a .NET assembly that was built to be a Node API module, using static binding to
|
|
23
11
|
* the APIs the module specifically exports to JS.
|
|
@@ -25,33 +13,32 @@ export interface Assembly {
|
|
|
25
13
|
* @returns The JavaScript module exported by the assembly. (Type information for the module
|
|
26
14
|
* may be available in a separate generated type-definitions file.)
|
|
27
15
|
*/
|
|
28
|
-
export
|
|
16
|
+
export function require(dotnetAssemblyFilePath: string): any;
|
|
29
17
|
|
|
30
18
|
/**
|
|
31
|
-
* Loads an arbitrary .NET assembly that isn't necessarily designed as a JS module,
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* @
|
|
35
|
-
* is a public type in the assembly.
|
|
19
|
+
* Loads an arbitrary .NET assembly that isn't necessarily designed as a JS module, enabling
|
|
20
|
+
* dynamic invocation of any APIs in the assembly. After loading, types from the assembly are
|
|
21
|
+
* available via namespaces on the main dotnet module.
|
|
22
|
+
* @param assemblyNameOrFilePath Path to the .NET assembly DLL file, or name of a system assembly.
|
|
36
23
|
*/
|
|
37
|
-
export
|
|
24
|
+
export function load(assemblyNameOrFilePath: string): void;
|
|
38
25
|
|
|
39
26
|
/**
|
|
40
27
|
* Adds a listener for the `resolving` event, which is raised when a .NET assembly requires
|
|
41
28
|
* an additional dependent assembly to be resolved and loaded. The listener must call `load()`
|
|
42
29
|
* to load the requested assembly file.
|
|
43
30
|
*/
|
|
44
|
-
export
|
|
31
|
+
export function addListener(
|
|
45
32
|
event: 'resolving',
|
|
46
33
|
listener: (assemblyName: string, assemblyVersion: string) => void,
|
|
47
|
-
):
|
|
34
|
+
): void;
|
|
48
35
|
|
|
49
36
|
/**
|
|
50
37
|
* Removes a listener for the `resolving` event.
|
|
51
38
|
*/
|
|
52
|
-
export
|
|
39
|
+
export function removeListener(
|
|
53
40
|
event: 'resolving',
|
|
54
41
|
listener: (assemblyName: string, assemblyVersion: string) => void,
|
|
55
|
-
):
|
|
42
|
+
): void;
|
|
56
43
|
|
|
57
|
-
}
|
|
44
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|