fix: lint errors removed by using satisfies or as for type (#3934)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com> Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
This commit is contained in:
@@ -180,7 +180,6 @@ import { GQLTabService } from "~/services/tab/graphql"
|
||||
import { computed } from "vue"
|
||||
import {
|
||||
HoppCollection,
|
||||
HoppGQLAuth,
|
||||
HoppGQLRequest,
|
||||
makeGQLRequest,
|
||||
} from "@hoppscotch/data"
|
||||
@@ -226,7 +225,7 @@ const editingRequest = ref<HoppGQLRequest | null>(null)
|
||||
const editingRequestIndex = ref<number | null>(null)
|
||||
|
||||
const editingProperties = ref<{
|
||||
collection: HoppCollection | null
|
||||
collection: Partial<HoppCollection> | null
|
||||
isRootCollection: boolean
|
||||
path: string
|
||||
inheritedProperties?: HoppInheritedProperty
|
||||
@@ -265,8 +264,9 @@ onMounted(() => {
|
||||
)
|
||||
|
||||
if (unsavedCollectionPropertiesString) {
|
||||
const unsavedCollectionProperties: EditingProperties<"GraphQL"> =
|
||||
JSON.parse(unsavedCollectionPropertiesString)
|
||||
const unsavedCollectionProperties: EditingProperties = JSON.parse(
|
||||
unsavedCollectionPropertiesString
|
||||
)
|
||||
|
||||
const auth = unsavedCollectionProperties.collection?.auth
|
||||
|
||||
@@ -610,7 +610,7 @@ const editProperties = ({
|
||||
if (collectionIndex === null || collection === null) return
|
||||
|
||||
const parentIndex = collectionIndex.split("/").slice(0, -1).join("/") // remove last folder to get parent folder
|
||||
let inheritedProperties = {}
|
||||
let inheritedProperties = undefined
|
||||
|
||||
if (parentIndex) {
|
||||
const { auth, headers } = cascadeParentCollectionForHeaderAuth(
|
||||
@@ -621,7 +621,7 @@ const editProperties = ({
|
||||
inheritedProperties = {
|
||||
auth,
|
||||
headers,
|
||||
} as HoppInheritedProperty
|
||||
}
|
||||
}
|
||||
|
||||
editingProperties.value = {
|
||||
@@ -635,11 +635,15 @@ const editProperties = ({
|
||||
}
|
||||
|
||||
const setCollectionProperties = (newCollection: {
|
||||
collection: HoppCollection
|
||||
collection: Partial<HoppCollection> | null
|
||||
path: string
|
||||
isRootCollection: boolean
|
||||
}) => {
|
||||
const { collection, path, isRootCollection } = newCollection
|
||||
if (!collection) {
|
||||
return
|
||||
}
|
||||
|
||||
if (isRootCollection) {
|
||||
editGraphqlCollection(parseInt(path), collection)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user