You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update workflows to upload to GitHub Pages
* make all defined error types exportable
* update errors related types
* make more types exportable from api
* code refactoring, fix some documentation generation warnings
* define custom module names for documentation generation
* rename modules and code refactoring
* make setGitClientAgent util as internal
* add more JSDoc comments
* code refactoring
* update comments
* replace rmdir FsClient function with rm to allow recursive deletion
* add more JSDoc comments
* update some comments
* code refactoring
* add more JSDoc comments
* update browser usage example
* update package description and keywords
* add more comments
* add comments for BlobMergeCallback
* add more documentation for callback functions
* add documentation for ProgressCallback
* add documentation for AuthCallback
* update documentation
* add documentation for SignCallback
* add tests for custom conflict resolver
* add documentation for BlobMergeCallbackParams
* add more documentation for BlobMergeCallback
* add documentation for HttpClient
* update documentation for FsClient
* update documentation
* add documentation for Cache object
Copy file name to clipboardExpand all lines: src/api/checkout.ts
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ import { join } from '../utils/join'
6
6
import{FsClient}from'../models/FsClient'
7
7
import{ProgressCallback}from'../models'
8
8
9
-
typeCheckoutParams={
9
+
10
+
exporttypeCheckoutParams={
10
11
/** A file system implementation. */
11
12
fs: FsClient
12
13
@@ -16,7 +17,7 @@ type CheckoutParams = {
16
17
/** The working tree directory path. */
17
18
dir: string
18
19
19
-
/** The git directory path (default: `join(dir, '.git')`). */
20
+
/** The git directory path (default: `{dir}/.git`). */
20
21
gitdir?: string
21
22
22
23
/** Which remote repository to use (default: `origin`). */
@@ -52,40 +53,39 @@ type CheckoutParams = {
52
53
*
53
54
* If the branch already exists it will check out that branch. Otherwise, it will create a new remote tracking branch set to track the remote branch of that name.
54
55
*
55
-
* @param{CheckoutParams} args
56
+
* @param args
56
57
*
57
-
* @returns{Promise<void>} Resolves successfully when filesystem operations are complete
58
+
* @returns Resolves successfully when filesystem operations are complete.
58
59
*
59
60
* @example
60
61
* // switch to the main branch
61
-
* await git.checkout({
62
+
* await checkout({
62
63
* fs,
63
64
* dir: '/tutorial',
64
65
* ref: 'main'
65
66
* })
66
-
* console.log('done')
67
67
*
68
68
* @example
69
69
* // restore the 'docs' and 'src/docs' folders to the way they were, overwriting any changes
70
-
* await git.checkout({
70
+
* await checkout({
71
71
* fs,
72
72
* dir: '/tutorial',
73
73
* force: true,
74
74
* filepaths: ['docs', 'src/docs']
75
75
* })
76
-
* console.log('done')
77
76
*
78
77
* @example
79
78
* // restore the 'docs' and 'src/docs' folders to the way they are in the 'develop' branch, overwriting any changes
0 commit comments