chore: add types

This commit is contained in:
EnixCoda 2021-02-01 18:06:14 +08:00
parent e066675817
commit e6a0e0a139
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD
2 changed files with 4 additions and 4 deletions

View file

@ -105,8 +105,8 @@ function getCurrentPageType() {
)
}
const REPO_TYPE_PRIVATE = 'private'
const REPO_TYPE_PUBLIC = 'public'
const REPO_TYPE_PRIVATE = 'private' as const
const REPO_TYPE_PUBLIC = 'public' as const
export function getRepoPageType() {
const headerSelector = `#js-repo-pjax-container .pagehead.repohead h1`
return $(headerSelector, header => {

View file

@ -25,8 +25,8 @@ export function getCurrentBranch() {
raiseError(new Error('cannot get current branch'))
}
const REPO_TYPE_PRIVATE = 'private'
const REPO_TYPE_PUBLIC = 'public'
const REPO_TYPE_PRIVATE = 'private' as const
const REPO_TYPE_PUBLIC = 'public' as const
export function getRepoPageType() {
const headerSelector = `.git-project-title .icon-lock`
return $(