@openmrs/esm-api 6.3.1-pre.3105 → 6.3.1-pre.3119

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.
@@ -1,3 +1,3 @@
1
- [0] Successfully compiled: 13 files with swc (78.07ms)
1
+ [0] Successfully compiled: 13 files with swc (94.78ms)
2
2
  [0] swc --strip-leading-paths src -d dist exited with code 0
3
3
  [1] tsc --project tsconfig.build.json exited with code 0
@@ -126,7 +126,9 @@ export function getLoggedInUser() {
126
126
  if (state.loaded && state.session.user) {
127
127
  user = state.session.user;
128
128
  res(state.session.user);
129
- unsubscribe && unsubscribe();
129
+ if (unsubscribe) {
130
+ unsubscribe();
131
+ }
130
132
  }
131
133
  };
132
134
  handler(sessionStore.getState());
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
1
2
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-api",
3
- "version": "6.3.1-pre.3105",
3
+ "version": "6.3.1-pre.3119",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The javascript module for interacting with the OpenMRS API",
6
6
  "type": "module",
@@ -61,10 +61,10 @@
61
61
  "@openmrs/esm-navigation": "6.x"
62
62
  },
63
63
  "devDependencies": {
64
- "@openmrs/esm-config": "6.3.1-pre.3105",
65
- "@openmrs/esm-error-handling": "6.3.1-pre.3105",
66
- "@openmrs/esm-globals": "6.3.1-pre.3105",
67
- "@openmrs/esm-navigation": "6.3.1-pre.3105",
64
+ "@openmrs/esm-config": "6.3.1-pre.3119",
65
+ "@openmrs/esm-error-handling": "6.3.1-pre.3119",
66
+ "@openmrs/esm-globals": "6.3.1-pre.3119",
67
+ "@openmrs/esm-navigation": "6.3.1-pre.3119",
68
68
  "@swc/cli": "^0.7.7",
69
69
  "@swc/core": "^1.11.29",
70
70
  "concurrently": "^9.1.2",
@@ -199,14 +199,17 @@ export function userHasAccess(
199
199
  }
200
200
 
201
201
  export function getLoggedInUser() {
202
- let user;
203
- let unsubscribe;
202
+ let user: LoggedInUser;
203
+ let unsubscribe: () => void;
204
204
  return new Promise<LoggedInUser>((res) => {
205
205
  const handler = (state: SessionStore) => {
206
206
  if (state.loaded && state.session.user) {
207
207
  user = state.session.user;
208
208
  res(state.session.user);
209
- unsubscribe && unsubscribe();
209
+
210
+ if (unsubscribe) {
211
+ unsubscribe();
212
+ }
210
213
  }
211
214
  };
212
215
  handler(sessionStore.getState());
@@ -64,6 +64,7 @@ export interface Role {
64
64
  links: Array<any>;
65
65
  }
66
66
 
67
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
67
68
  export interface User extends OpenmrsResource {
68
69
  // TODO: add more attributes
69
70
  }