Upgrades typescript to 4.9.4 (#6747)

* Upgrades typescript to 4.9.4

* Type fixes
This commit is contained in:
Omar López 2023-01-26 18:50:56 -07:00 committed by GitHub
parent 3b838c475a
commit 16adf86c8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 34 additions and 25 deletions

View File

@ -49,7 +49,7 @@
"storybook-addon-next": "^1.6.9",
"storybook-react-i18next": "^1.1.2",
"tailwindcss": "^3.2.1",
"typescript": "^4.7.4",
"typescript": "^4.9.4",
"vite": "^2.9.15"
}
}

View File

@ -24,6 +24,6 @@
"@types/node": "16.9.1",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -164,6 +164,6 @@
"tailwindcss": "^3.2.1",
"ts-jest": "^28.0.8",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -97,7 +97,10 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou
</span>
)}
</div>
<EventTypeDescription eventType={type} />
<EventTypeDescription
// @ts-expect-error FIXME We have a type mismtach here @hariombalhara @sean-brydon
eventType={type}
/>
</Link>
);
};

View File

@ -25,11 +25,11 @@
"react": "^18.2.0"
},
"devDependencies": {
"chokidar": "^3.5.3",
"@types/react": "^18.0.17",
"chokidar": "^3.5.3",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react-hooks": "^4.6.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -20,6 +20,7 @@ export default function FormInputFields(props: Props) {
<>
{form.fields?.map((field) => {
if (isRouterLinkedField(field)) {
// @ts-expect-error FIXME @hariombalhara
field = field.routerField;
}
const widget = queryBuilderConfig.widgets[field.type];

View File

@ -28,6 +28,6 @@
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwind-scrollbar": "^2.0.1",
"tailwindcss": "^3.2.1",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -46,8 +46,8 @@
"eslint": "^8.22.0",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.18",
"typescript": "^4.7.4",
"vite": "^2.9.15",
"tailwindcss": "^3.2.1"
"tailwindcss": "^3.2.1",
"typescript": "^4.9.4",
"vite": "^2.9.15"
}
}

View File

@ -46,7 +46,7 @@
"@vitejs/plugin-react": "^1.3.2",
"eslint": "^8.22.0",
"npm-run-all": "^4.1.5",
"typescript": "^4.7.4",
"typescript": "^4.9.4",
"vite": "^2.9.15"
},
"dependencies": {

View File

@ -25,7 +25,7 @@
"types": "./dist/index.d.ts",
"devDependencies": {
"eslint": "^8.22.0",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
},
"dependencies": {
"@calcom/embed-core": "*"

View File

@ -8,7 +8,7 @@
"@typescript-eslint/utils": "^5.33.1",
"eslint": "^8.22.0",
"ts-node": "^10.9.1",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
},
"devDependencies": {
"@types/eslint": "^8.4.5"

View File

@ -61,7 +61,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
};
export const withLicenseRequired =
<T,>(Component: ComponentType<T>) =>
<T extends JSX.IntrinsicAttributes>(Component: ComponentType<T>) =>
// eslint-disable-next-line react/display-name
(hocProps: T) =>
(

View File

@ -51,7 +51,7 @@ const LicenseRequired = ({ children, as = "", ...rest }: LicenseRequiredProps) =
};
export const withLicenseRequired =
<T,>(Component: ComponentType<T>) =>
<T extends JSX.IntrinsicAttributes>(Component: ComponentType<T>) =>
// eslint-disable-next-line react/display-name
(hocProps: T) =>
(

View File

@ -3,7 +3,8 @@ export function getErrorFromUnknown(cause: unknown): Error & { statusCode?: numb
return cause;
}
if (typeof cause === "string") {
// @ts-expect-error https://github.com/tc39/proposal-error-cause
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore https://github.com/tc39/proposal-error-cause
return new Error(cause, { cause });
}

View File

@ -31,6 +31,6 @@
"@calcom/tsconfig": "*",
"@calcom/types": "*",
"@faker-js/faker": "^7.3.0",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -353,7 +353,7 @@ export function denullishShape<
* @returns The constructed tuple array from the given object
* @see https://github.com/3x071c/lsg-remix/blob/e2a9592ba3ec5103556f2cf307c32f08aeaee32d/app/lib/util/entries.ts
*/
export const entries = <O>(
export const entries = <O extends Record<string, unknown>>(
obj: O
): {
readonly [K in keyof O]: [K, O[K]];

View File

@ -21,9 +21,13 @@ const RadioArea = React.forwardRef<HTMLInputElement, RadioAreaProps>(
);
}
);
interface RadioAreaGroupProps extends Omit<React.ComponentPropsWithoutRef<"div">, "onChange"> {
type MaybeArray<T> = T[] | T;
type ChildrenOfType<T extends React.ElementType> = MaybeArray<
React.ReactElement<React.ComponentPropsWithoutRef<T>>
>;
interface RadioAreaGroupProps extends Omit<React.ComponentPropsWithoutRef<"div">, "onChange" | "children"> {
onChange?: (value: string) => void;
children: ChildrenOfType<typeof RadioArea>;
}
const RadioAreaGroup = ({ children, className, onChange, ...passThroughProps }: RadioAreaGroupProps) => {

View File

@ -40,6 +40,6 @@
"@calcom/tsconfig": "*",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}

View File

@ -26301,10 +26301,10 @@ typeorm@0.3.11:
xml2js "^0.4.23"
yargs "^17.3.1"
typescript@^4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
typescript@^4.9.4:
version "4.9.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
tzdata@^1.0.30:
version "1.0.36"