Skip to content
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

Upgrades typescript to 4.9.4 #6747

Merged
merged 2 commits into from Jan 27, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/storybook/package.json
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion apps/swagger/package.json
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion apps/web/package.json
Expand Up @@ -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"
}
}
5 changes: 4 additions & 1 deletion apps/web/pages/event-types/index.tsx
Expand Up @@ -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>
);
};
Expand Down
4 changes: 2 additions & 2 deletions packages/app-store-cli/package.json
Expand Up @@ -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"
}
}
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Expand Up @@ -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"
}
}
6 changes: 3 additions & 3 deletions packages/embeds/embed-core/package.json
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion packages/embeds/embed-react/package.json
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/embeds/embed-snippet/package.json
Expand Up @@ -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": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion packages/features/ee/common/components/LicenseRequired.tsx
Expand Up @@ -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) =>
(
Expand Down
Expand Up @@ -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) =>
(
Expand Down
3 changes: 2 additions & 1 deletion packages/lib/errors.ts
Expand Up @@ -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 });
}

Expand Down
2 changes: 1 addition & 1 deletion packages/lib/package.json
Expand Up @@ -31,6 +31,6 @@
"@calcom/tsconfig": "*",
"@calcom/types": "*",
"@faker-js/faker": "^7.3.0",
"typescript": "^4.7.4"
"typescript": "^4.9.4"
}
}
2 changes: 1 addition & 1 deletion packages/prisma/zod-utils.ts
Expand Up @@ -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]];
Expand Down
8 changes: 6 additions & 2 deletions packages/ui/form/radio-area/RadioAreaGroup.tsx
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Expand Up @@ -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"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -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"
Expand Down