Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

name: Lint TypeScript

# FIXME: temporary disable typecheck, until we can perform typecheck without checking Talk
on:
workflow_dispatch:
on: pull_request

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion src/app/AppConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const appConfigChangeListeners: { [K in AppConfigKey]?: Set<(value: AppConfig[K]
async function readAppConfigFile(): Promise<Partial<AppConfig>> {
try {
const content = await readFile(getAppConfigFilePath(), 'utf-8')
return JSON.parse(content)
return JSON.parse(content) as Partial<AppConfig>
} catch (error) {
if (error instanceof Error && 'code' in error && error.code !== 'ENOENT') {
console.error('Failed to read the application config file', error)
Expand Down
4 changes: 2 additions & 2 deletions src/certificate/renderer/certificate.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function parseElectronCertificateFingerprint(fingerprint: string): { algo

if (isMatched) {
return {
algorithm: algorithm.toUpperCase(),
value: base64ToHex(value),
algorithm: algorithm!.toUpperCase(),
value: base64ToHex(value!),
}
}
return {
Expand Down
5 changes: 5 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module '*.svg?raw' {
export default url
}

// Ignore types from Talk:
// No need to type check entire Talk codebase
// And @talk path is resolved on build time which is problematic fo TS
declare module '@talk/*'

declare module 'vue-material-design-icons/*.vue' {
import type { Component } from 'vue'
const component: Component<{ size: number }, Record<string, never>, Record<string, never>, Record<string, never>, Record<string, never>>
Expand Down
2 changes: 1 addition & 1 deletion src/talk/renderer/TalkWrapper/talk.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function createTalkHashStoreAdapter(): TalkHashStoreAdapter {
let onDirty: Parameters<TalkHashStoreAdapter['onDirty']>[0]
let onUpdate: Parameters<TalkHashStoreAdapter['onUpdate']>[0]

talkHashStore.$onAction(({ name, after }) => {
talkHashStore.$onAction(({ name, after }: { name: string, after: (callback: () => void) => void }) => {
if (name !== 'setNextcloudTalkHash') {
return
}
Expand Down
2 changes: 1 addition & 1 deletion src/talk/renderer/TitleBar/components/DevMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import IconMessageBadgeOutline from 'vue-material-design-icons/MessageBadgeOutli
import IconMonitorShare from 'vue-material-design-icons/MonitorShare.vue'
import { appData } from '../../../../app/AppData.js'

const supportsTestAdminNotification = appData.capabilities?.notifications?.['admin-notifications']?.includes('ocs') && appData.userMetadata?.groups.includes('admin')
const supportsTestAdminNotification = appData.capabilities?.notifications?.['admin-notifications']?.includes('ocs') && (appData.userMetadata as unknown as ({ groups: string[] } | null))?.groups.includes('admin')
const supportsTestPushNotification = appData.capabilities?.notifications?.['ocs-endpoints']?.includes('test-push')
const supportsTestNotification = supportsTestPushNotification || supportsTestAdminNotification

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const { disabled = false } = defineProps<{
maxlength="80"
:disabled="disabled"
:model-value="message ?? ''"
@update:model-value="message = $event" />
@update:model-value="message = ($event as string)" />
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/talk/renderer/UserStatus/userStatus.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { formatDuration, formatDurationFromNow } from '../../../shared/datetime.
/**
* List of user status types that user can set
*/
export const availableUserStatusStatusTypes: UserStatusStatusType[] = (appData.capabilities as unknown)?.user_status?.supports_busy
export const availableUserStatusStatusTypes: UserStatusStatusType[] = (appData.capabilities as { user_status?: { supports_busy?: boolean } })?.user_status?.supports_busy
? ['online', 'away', 'busy', 'dnd', 'invisible']
: ['online', 'away', 'dnd', 'invisible']

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"strictNullChecks": true,
"paths": {
"@global-styles/*": ["resources/server-global-styles/master/*"],
"@talk/*": ["spreed/*"],
},
},
}