forked from appwrite/sdk-for-react-native
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ feat: Update script and context for AppWriteProvider
Adds default context values for AppWriteProvider and updates type imports. The changes introduce default values for the AppWriteContext, ensuring that any consumer of the context will receive a complete object with all necessary functions and state, even if the provider is not found in the component tree. This prevents potential runtime errors when attempting to destructure or invoke context values that would otherwise be undefined. Additionally, the changes clean up the import statements for types, ensuring that type imports are consistent and follow project conventions. This helps maintain code readability and project structure.
- Loading branch information
Showing
4 changed files
with
20 additions
and
7 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
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
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,8 +1,8 @@ | ||
import { type AppwriteConfigType } from './AppWriteProvider'; | ||
export declare const appWriteAuth: (config: AppwriteConfigType) => { | ||
signUp: (email: string, password: string, username: string) => Promise<import("../models").Models.Document>; | ||
signIn: (email: string, password: string) => Promise<import("../models").Models.Session>; | ||
getAccount: () => Promise<import("../models").Models.User<import("../models").Models.Preferences>>; | ||
getCurrentUser: () => Promise<import("../models").Models.Document | null>; | ||
signUp: (email: string, password: string, username: string) => Promise<import("client").Models.Document>; | ||
signIn: (email: string, password: string) => Promise<import("client").Models.Session>; | ||
getAccount: () => Promise<import("client").Models.User<import("client").Models.Preferences>>; | ||
getCurrentUser: () => Promise<import("client").Models.Document | null>; | ||
signOut: () => Promise<{}>; | ||
}; |