From ad4a206102a7e5ab6cb72872f283270858e2340b Mon Sep 17 00:00:00 2001 From: Tiago Paiva Date: Mon, 20 Jan 2025 17:15:00 -0300 Subject: [PATCH] fix: Types not being exported and autocomplete not working (#284) * fix: Types not being exported and autocomplete not working * new patch version v9.0.1 --- index.d.ts | 1 + lib/flagsmith/package.json | 14 +++++++++----- lib/react-native-flagsmith/package.json | 2 +- react.d.ts | 5 +++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/index.d.ts b/index.d.ts index a87b7397..8251316f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,6 +1,7 @@ import { IFlagsmith } from './types'; declare const flagsmith: IFlagsmith; export default flagsmith; +export * from './types'; export declare const createFlagsmithInstance: < F extends string = string, T extends string = string, diff --git a/lib/flagsmith/package.json b/lib/flagsmith/package.json index cfb5d809..e48f9d32 100644 --- a/lib/flagsmith/package.json +++ b/lib/flagsmith/package.json @@ -1,6 +1,6 @@ { "name": "flagsmith", - "version": "9.0.0", + "version": "9.0.1", "description": "Feature flagging to support continuous development", "main": "./index.js", "module": "./index.mjs", @@ -10,22 +10,26 @@ ".": { "import": "./index.mjs", "require": "./index.js", - "browser": "./index.js" + "browser": "./index.js", + "types": "./index.d.ts" }, "./isomorphic": { "import": "./isomorphic.mjs", "require": "./isomorphic.js", - "browser": "./isomorphic.js" + "browser": "./isomorphic.js", + "types": "./isomorphic.d.ts" }, "./react": { "import": "./react.mjs", "require": "./react.js", - "browser": "./react.js" + "browser": "./react.js", + "types": "./react.d.ts" }, "./next-middleware": { "import": "./next-middleware.mjs", "require": "./next-middleware.js", - "browser": "./next-middleware.js" + "browser": "./next-middleware.js", + "types": "./next-middleware.d.ts" } }, "repository": { diff --git a/lib/react-native-flagsmith/package.json b/lib/react-native-flagsmith/package.json index c64900fa..fb994713 100644 --- a/lib/react-native-flagsmith/package.json +++ b/lib/react-native-flagsmith/package.json @@ -1,6 +1,6 @@ { "name": "react-native-flagsmith", - "version": "9.0.0", + "version": "9.0.1", "description": "Feature flagging to support continuous development", "main": "./index.js", "repository": { diff --git a/react.d.ts b/react.d.ts index 7d919ba0..c9d9bb70 100644 --- a/react.d.ts +++ b/react.d.ts @@ -1,10 +1,11 @@ import React, { FC } from 'react'; -import { IFlagsmith, IFlagsmithTrait, IFlagsmithFeature, IState } from '../types'; +import { IFlagsmith, IFlagsmithTrait, IFlagsmithFeature, IState, LoadingState } from './types'; +export * from './types'; export declare const FlagsmithContext: React.Context; export declare type FlagsmithContextType = { flagsmith: IFlagsmith; options?: Parameters['init']>[0]; - serverState?: IState; + serverState?: IState; children: React.ReactElement[] | React.ReactElement; }; export declare const FlagsmithProvider: FC;