-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(editor): Fix External secrets typecheck (no-changelog) #9434
Changes from 3 commits
15b7e8d
ba9a03e
1c241c2
5f02329
23a71ba
fe799be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
<script lang="ts" setup> | ||
/* eslint-disable @typescript-eslint/ban-ts-comment */ | ||
import type { PropType } from 'vue'; | ||
import type { ExternalSecretsProvider } from '@/Interface'; | ||
import { computed } from 'vue'; | ||
|
||
// @ts-expect-error | ||
import infisical from '../assets/images/infisical.webp'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can put a module definition to one of the shim.d.ts files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried, it doesn't get picked up by |
||
// @ts-expect-error | ||
import doppler from '../assets/images/doppler.webp'; | ||
// @ts-expect-error | ||
import vault from '../assets/images/hashicorp.webp'; | ||
// @ts-expect-error | ||
import awsSecretsManager from '../assets/images/aws-secrets-manager.svg'; | ||
|
||
const props = defineProps({ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,9 @@ export const isResourceMapperValue = (value: unknown): value is string | number | |
export const isJSPlumbEndpointElement = (element: Node): element is HTMLElement => { | ||
return 'jtk' in element && 'endpoint' in (element.jtk as object); | ||
}; | ||
|
||
export function isDateObject(date: unknown): date is Date { | ||
return ( | ||
!!date && Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date as number) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Apparently There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting. Might be helpful to add it as a comment because it would confusing to others. |
||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect-error
does not feel right here. Could we follow something similar to heredeclare module '*.svg'
? https://stackoverflow.com/questions/52759220/importing-images-in-typescript-react-cannot-find-moduleThough in my quick testing, it did not work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that too. For some reason
vue-tsc
doesn't pick up the shims file. 🥲There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a TODO comment here?