Skip to content

Commit

Permalink
remove many explicit anys
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippIRL committed Jan 18, 2024
1 parent 75dec38 commit 11c9ecb
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions components/SocialCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ const SocialCardDiv = styled(motion.div)`
position: relative;
`

const SocialCardTitle: any = styled.span`
const SocialCardTitle = styled.span`
color: #fff;
font-weight: bold;
font-size: 2.4rem;
margin-left: 5px;
`

const SocialCardText: any = styled.span`
const SocialCardText = styled.span`
color: #fff;
font-size: 1.6rem;
margin-left: 5px;
`

const SocialCardIcon: any = styled.img`
const SocialCardIcon = styled.img`
width: 75%;
height: 75%;
opacity: .4;
Expand Down
3 changes: 3 additions & 0 deletions components/Terminal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// very legacy code, so:
/* eslint-disable @typescript-eslint/no-explicit-any */

import React from 'react'
import styled, { css, keyframes } from 'styled-components'
import type EventBus from '../scripts/EventBus'
Expand Down
4 changes: 2 additions & 2 deletions pages/socials.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ const colorRotateAnim = keyframes`
}
`

const SocialsTitle: any = styled.h1`
const SocialsTitle = styled.h1<{colorRotate: boolean}>`
font-size: 5rem;
color: #fff;
${(props: any) => props.colorRotate && css`
${(props) => props.colorRotate && css`
color: #f00;
animation: 3s ${colorRotateAnim} linear infinite;
`}
Expand Down
10 changes: 8 additions & 2 deletions scripts/EventBus.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
export type BusEvent = {

id: string,
data: any,

// eslint-disable-next-line @typescript-eslint/no-explicit-any
data?: any,

}

export type BusListener = (e: BusEvent) => void;
Expand All @@ -12,6 +16,8 @@ export default class EventBus {
constructor() {
if(process.env.NODE_ENV === 'development') {
this.listeners.push(console.log);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
(globalThis as any).eventBus = this
}
}
Expand All @@ -27,7 +33,7 @@ export default class EventBus {
}
}

post(msg: any) {
post(msg: BusEvent) {
this.listeners.forEach(listener => listener(msg))
}

Expand Down

1 comment on commit 11c9ecb

@vercel
Copy link

@vercel vercel bot commented on 11c9ecb Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.