-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add typings for module and submodules
Improve DX of typings Revert "Improve DX of typings" This reverts commit 46c2d36.
- Loading branch information
Showing
7 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export function useHardwareConcurrency(): { unsupported: true } | { numberOfLogicalProcessors: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './hardware-concurrency' | ||
export * from './memory' | ||
export * from './network' | ||
export * from './save-data' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export { default as useNetworkStatus } from './network'; | ||
export { default as useSaveData } from './save-data'; | ||
export { default as useMemoryStatus } from './memory'; | ||
export { default as useHardwareConcurrency } from './hardware-concurrency'; | ||
export { useNetworkStatus } from './network'; | ||
export { useSaveData } from './save-data'; | ||
export { useMemoryStatus } from './memory'; | ||
export { useHardwareConcurrency } from './hardware-concurrency'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export function useMemoryStatus(): { unsupported: true } | { | ||
deviceMemory: number, | ||
totalJSHeapSize: number | null, | ||
usedJSHeapSize: number | null, | ||
jsHeapSizeLimit: number | null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export type EffectiveConnectionType = 'slow-2g' | '2g' | '3g' | '4g' | ||
|
||
export function useNetworkStatus(): { unsupported: true } | { | ||
effectiveConnectionType: EffectiveConnectionType | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export function useSaveData(): { unsupported: boolean, saveData: boolean | null } |