@openfin/core 33.76.6 → 33.76.8
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/README.md +37 -9
- package/package.json +1 -1
- package/src/OpenFin.d.ts +0 -1
- package/src/OpenFin.js +0 -3
package/README.md
CHANGED
|
@@ -8,19 +8,19 @@ Libraries are also available for the following frameworks:
|
|
|
8
8
|
* [.Net](https://developers.openfin.co/of-docs/docs/net-api)
|
|
9
9
|
* [Java](https://developers.openfin.co/of-docs/docs/java-api)
|
|
10
10
|
|
|
11
|
-
## Prerequsites
|
|
12
|
-
|
|
13
|
-
None.
|
|
14
|
-
|
|
15
11
|
## Installation
|
|
16
12
|
|
|
17
13
|
This package cannot be installed as a dev dependency because it is not types-only.
|
|
18
14
|
|
|
19
15
|
With npm:
|
|
20
|
-
|
|
16
|
+
```bash
|
|
17
|
+
$ npm i -S @openfin/core
|
|
18
|
+
```
|
|
21
19
|
|
|
22
20
|
With yarn:
|
|
23
|
-
|
|
21
|
+
```bash
|
|
22
|
+
$ yarn add @openfin/core
|
|
23
|
+
```
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
@@ -35,9 +35,38 @@ const showWindow = async (identity: OpenFin.Identity) => {
|
|
|
35
35
|
const win = await fin.Window.wrap(identity);
|
|
36
36
|
await win.show();
|
|
37
37
|
|
|
38
|
-
const isOpenFin = fin.me.isOpenFin; // false if not in OpenFin
|
|
38
|
+
const isOpenFin = fin.me.isOpenFin; // false if not in OpenFin
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Migrating to v30+
|
|
43
|
+
|
|
44
|
+
Prior to v30, the `OpenFin` namespace was ambiently declared and always available. Starting with v30, you must import it directly or specify it in the tsconfig.
|
|
45
|
+
|
|
46
|
+
### Importing the type
|
|
47
|
+
|
|
48
|
+
To import the `OpenFin` namespace:
|
|
49
|
+
```typescript
|
|
50
|
+
import OpenFin from "@openfin/core";
|
|
51
|
+
|
|
52
|
+
type OFWindow = OpenFin.Window;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### TSConfig types array
|
|
56
|
+
|
|
57
|
+
To have the `OpenFin` available in your code automatically, just update your tsconfig `types` key:
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"compilerOptions": {
|
|
61
|
+
"target": ...,
|
|
62
|
+
"module": ...,
|
|
63
|
+
...,
|
|
64
|
+
"types": ["@openfin/core/OpenFin"]
|
|
65
|
+
}
|
|
39
66
|
}
|
|
67
|
+
|
|
40
68
|
```
|
|
69
|
+
|
|
41
70
|
## For more information
|
|
42
71
|
|
|
43
72
|
- [Developer guide](https://developers.openfin.co/of-docs/docs/container-overview)
|
|
@@ -45,11 +74,10 @@ const isOpenFin = fin.me.isOpenFin; // false if not in OpenFin
|
|
|
45
74
|
|
|
46
75
|
## License
|
|
47
76
|
|
|
48
|
-
Copyright 2020-
|
|
77
|
+
Copyright 2020-2023 OpenFin
|
|
49
78
|
|
|
50
79
|
The code in this package is distributed under the Apache License, Version 2.0.
|
|
51
80
|
|
|
52
81
|
However, if you run this code, it may call on the OpenFin RVM or OpenFin Runtime, which are covered by OpenFin's Developer, Community, and Enterprise licenses. You can learn more about OpenFin licensing at the links listed below or email us at support@openfin.co with questions.
|
|
53
82
|
|
|
54
|
-
- [Licensing](https://www.openfin.co/licensing/)
|
|
55
83
|
- [Developer agreement](https://openfin.co/developer-agreement/)
|
package/package.json
CHANGED
package/src/OpenFin.d.ts
CHANGED
package/src/OpenFin.js
CHANGED