Skip to content

Commit

Permalink
fix(types): add better type for init (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
Youhy authored May 19, 2024
1 parent c74e6ed commit 495d91e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/distro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
* with `undefined` as value; the promise is resolved, instead of rejected, to avoid UnhandledPromiseRejectionWarning
* or errors affecting processes using unsupported Node.js versions.
*/
import type { LumigoSdkInitialization } from './bootstrap';
import { LUMIGO_LOGGING_NAMESPACE } from './constants';
import { minMajor, maxMajor } from './supportedVersions.json';
export type { LumigoSdkInitialization } from './bootstrap';

export const init = (() => {
export const init: Promise<LumigoSdkInitialization | undefined> = (() => {
const version = process.version;
try {
const nodeJsMajorVersion = parseInt(version.match(/v(\d+)\..*/)[1]);
Expand Down

0 comments on commit 495d91e

Please sign in to comment.