@enonic-types/lib-mail 7.11.0-B1 → 7.11.0-B3

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.
Files changed (2) hide show
  1. package/README.md +13 -4
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # Enonic XP lib-mail TS types
2
2
 
3
3
  > TypeScript definitions for `lib-mail` library of Enonic XP
4
+
4
5
  ## Install
5
6
 
6
7
  ```bash
7
- npm i --save-dev @enonic/lib-mail
8
+ npm i --save-dev @enonic-types/lib-mail
8
9
  ```
9
10
 
10
11
  ## Use
@@ -12,6 +13,7 @@ npm i --save-dev @enonic/lib-mail
12
13
  Add the corresponding types to your `tsconfig.json` file that is used for application's server-side TypeScript code.
13
14
 
14
15
  `tsconfig.json`
16
+
15
17
  ```json
16
18
  {
17
19
  "compilerOptions": {
@@ -24,9 +26,11 @@ Add the corresponding types to your `tsconfig.json` file that is used for applic
24
26
 
25
27
  ### Require and custom imports
26
28
 
27
- To make `require` work out of box, you must install and add the `@enonic-types/global` types. Aside from providing definitions for XP global objects, e.g. `log`, `app`, `__`, etc, requiring library by the default path will return typed object.
29
+ To make `require` work out of the box, you must install and add the `@enonic-types/global` types. Aside from providing definitions for XP
30
+ global objects, e.g. `log`, `app`, `__`, etc, requiring a library by the default path will return typed object.
28
31
 
29
32
  `tsconfig.json`
33
+
30
34
  ```diff
31
35
  {
32
36
  "compilerOptions": {
@@ -39,17 +43,21 @@ To make `require` work out of box, you must install and add the `@enonic-types/g
39
43
  ```
40
44
 
41
45
  `example.ts`
46
+
42
47
  ```ts
43
48
  const {send} = require('/lib/xp/mail');
44
49
  ```
45
50
 
46
- More detailed explanation on how it works and how to type custom import function can be found [here](https://github.com/enonic/xp/tree/master/modules/lib/typescript/README.md).
51
+ More detailed explanation on how it works and how to type custom import function can be
52
+ found [here](https://developer.enonic.com/docs/xp/stable/api).
47
53
 
48
54
  ### ES6-style import
49
55
 
50
- If you are planning to use `import` in your code and transpile it with the default `tsc` TypeScript compiler, you'll need to add proper types mapping to your configuration.
56
+ If you are planning to use `import` in your code and transpile it with the default `tsc` TypeScript compiler, you'll need to add proper
57
+ types mapping to your configuration.
51
58
 
52
59
  `tsconfig.json`
60
+
53
61
  ```diff
54
62
  {
55
63
  "compilerOptions": {
@@ -65,6 +73,7 @@ If you are planning to use `import` in your code and transpile it with the defau
65
73
  ```
66
74
 
67
75
  `example.ts`
76
+
68
77
  ```ts
69
78
  import {send} from '/lib/xp/mail';
70
79
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-mail",
3
- "version": "7.11.0-B1",
3
+ "version": "7.11.0-B3",
4
4
  "description": "Type definitions for lib-mail.",
5
5
  "types": "mail.d.ts",
6
6
  "files": [
@@ -26,6 +26,7 @@
26
26
  "url": "https://github.com/enonic/xp/issues"
27
27
  },
28
28
  "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
+ "dependencies": {},
29
30
  "publishConfig": {
30
31
  "access": "public"
31
32
  }