metano-runtime 3.2.0 → 3.3.0
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/system/disposable.d.ts +15 -0
- package/dist/system/disposable.js +15 -0
- package/dist/system/index.d.ts +1 -0
- package/dist/system/index.js +1 -0
- package/dist-unchecked/system/disposable.d.ts +15 -0
- package/dist-unchecked/system/disposable.js +15 -0
- package/dist-unchecked/system/index.d.ts +1 -0
- package/dist-unchecked/system/index.js +1 -0
- package/package.json +1 -1
- package/src/system/disposable.ts +27 -0
- package/src/system/index.ts +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InterfaceType } from "./reflection/runtime-type.ts";
|
|
2
|
+
/**
|
|
3
|
+
* C# `System.IDisposable` (spec FR-111): `Dispose()` lowers to `dispose()`, and a C# `using`
|
|
4
|
+
* lowers to `try`/`finally` around the resource. There is no `Symbol.dispose` alias: stable
|
|
5
|
+
* Safari has none, and `using` disposal wraps errors in `SuppressedError`, unlike .NET.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDisposable {
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The descriptor of {@link IDisposable}. The test is nominal, as in .NET: a value is
|
|
12
|
+
* `IDisposable` only when its class descriptor lists the interface, never because it has a
|
|
13
|
+
* `dispose` method.
|
|
14
|
+
*/
|
|
15
|
+
export declare const IDisposable$runtimeType: InterfaceType<IDisposable>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { implementsInterface } from "./reflection/implements-interface.js";
|
|
2
|
+
/**
|
|
3
|
+
* The descriptor of {@link IDisposable}. The test is nominal, as in .NET: a value is
|
|
4
|
+
* `IDisposable` only when its class descriptor lists the interface, never because it has a
|
|
5
|
+
* `dispose` method.
|
|
6
|
+
*/
|
|
7
|
+
export const IDisposable$runtimeType = {
|
|
8
|
+
kind: "interface",
|
|
9
|
+
name: "IDisposable",
|
|
10
|
+
fullName: "System.IDisposable",
|
|
11
|
+
namespace: "System",
|
|
12
|
+
baseInterfaces: [],
|
|
13
|
+
plainImplementers: [],
|
|
14
|
+
test: (value) => implementsInterface(value, IDisposable$runtimeType),
|
|
15
|
+
};
|
package/dist/system/index.d.ts
CHANGED
package/dist/system/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { InterfaceType } from "./reflection/runtime-type.ts";
|
|
2
|
+
/**
|
|
3
|
+
* C# `System.IDisposable` (spec FR-111): `Dispose()` lowers to `dispose()`, and a C# `using`
|
|
4
|
+
* lowers to `try`/`finally` around the resource. There is no `Symbol.dispose` alias: stable
|
|
5
|
+
* Safari has none, and `using` disposal wraps errors in `SuppressedError`, unlike .NET.
|
|
6
|
+
*/
|
|
7
|
+
export interface IDisposable {
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The descriptor of {@link IDisposable}. The test is nominal, as in .NET: a value is
|
|
12
|
+
* `IDisposable` only when its class descriptor lists the interface, never because it has a
|
|
13
|
+
* `dispose` method.
|
|
14
|
+
*/
|
|
15
|
+
export declare const IDisposable$runtimeType: InterfaceType<IDisposable>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { implementsInterface } from "./reflection/implements-interface.js";
|
|
2
|
+
/**
|
|
3
|
+
* The descriptor of {@link IDisposable}. The test is nominal, as in .NET: a value is
|
|
4
|
+
* `IDisposable` only when its class descriptor lists the interface, never because it has a
|
|
5
|
+
* `dispose` method.
|
|
6
|
+
*/
|
|
7
|
+
export const IDisposable$runtimeType = {
|
|
8
|
+
kind: "interface",
|
|
9
|
+
name: "IDisposable",
|
|
10
|
+
fullName: "System.IDisposable",
|
|
11
|
+
namespace: "System",
|
|
12
|
+
baseInterfaces: [],
|
|
13
|
+
plainImplementers: [],
|
|
14
|
+
test: (value) => implementsInterface(value, IDisposable$runtimeType),
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { implementsInterface } from "./reflection/implements-interface.ts";
|
|
2
|
+
import type { InterfaceType } from "./reflection/runtime-type.ts";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* C# `System.IDisposable` (spec FR-111): `Dispose()` lowers to `dispose()`, and a C# `using`
|
|
6
|
+
* lowers to `try`/`finally` around the resource. There is no `Symbol.dispose` alias: stable
|
|
7
|
+
* Safari has none, and `using` disposal wraps errors in `SuppressedError`, unlike .NET.
|
|
8
|
+
*/
|
|
9
|
+
export interface IDisposable {
|
|
10
|
+
dispose(): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The descriptor of {@link IDisposable}. The test is nominal, as in .NET: a value is
|
|
15
|
+
* `IDisposable` only when its class descriptor lists the interface, never because it has a
|
|
16
|
+
* `dispose` method.
|
|
17
|
+
*/
|
|
18
|
+
export const IDisposable$runtimeType: InterfaceType<IDisposable> = {
|
|
19
|
+
kind: "interface",
|
|
20
|
+
name: "IDisposable",
|
|
21
|
+
fullName: "System.IDisposable",
|
|
22
|
+
namespace: "System",
|
|
23
|
+
baseInterfaces: [],
|
|
24
|
+
plainImplementers: [],
|
|
25
|
+
test: (value: unknown): value is IDisposable =>
|
|
26
|
+
implementsInterface(value, IDisposable$runtimeType),
|
|
27
|
+
};
|
package/src/system/index.ts
CHANGED