Skip to content

Commit 30e48b6

Browse files
committed
refactor: export internal types
1 parent 381e334 commit 30e48b6

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/pinia/api-extractor.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@
3636

3737
"ae-missing-release-tag": {
3838
"logLevel": "none"
39+
},
40+
41+
"ae-incompatible-release-tags": {
42+
"logLevel": "none"
3943
}
4044
},
4145

4246
"tsdocMessageReporting": {
4347
"default": {
4448
"logLevel": "warning"
49+
},
50+
"tsdoc-code-span-missing-delimiter": {
51+
"logLevel": "none"
4552
}
4653
}
4754
}

packages/pinia/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type {
4949
_ExtractGettersFromSetupStore_Keys,
5050
_ExtractStateFromSetupStore_Keys,
5151
_UnwrapAll,
52+
_Awaited,
5253
} from './types'
5354
export { MutationType } from './types'
5455

packages/pinia/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export type SubscriptionCallback<S> = (
161161

162162
// to support TS 4.4
163163
// TODO: remove in 2.1.0, use Awaited, and up the peer dep to TS 4.5
164-
type _Awaited<T> = T extends null | undefined
164+
export type _Awaited<T> = T extends null | undefined
165165
? T // special case for `null | undefined` when not in `--strictNullChecks` mode
166166
: T extends object & { then(onfulfilled: infer F): any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped
167167
? F extends (value: infer V, ...args: any) => any // if the argument to `then` is callable, extracts the first argument

0 commit comments

Comments
 (0)