Merge pull request #813 from ente-io/enable-typescript-strict-mode

Enable typescript strict mode
This commit is contained in:
Abhinav Kumar 2022-12-27 15:37:01 +05:30 committed by GitHub
commit 5b45b6a8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 5 deletions

View file

@ -86,4 +86,4 @@
"resolutions": {
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
}
}
}

View file

@ -293,7 +293,7 @@ function PhotoViewer(props: Iprops) {
if (callback || event === 'destroy') {
photoSwipe.listen(event, function (...args) {
if (callback) {
args.unshift(this);
args.unshift(photoSwipe);
callback(...args);
}
if (event === 'destroy') {

View file

@ -2,6 +2,7 @@ import { Stack } from '@mui/material';
import { AppContext } from 'pages/_app';
import React, { useContext } from 'react';
import { Subscription } from 'types/billing';
import { SetLoading } from 'types/gallery';
import {
activateSubscription,
cancelSubscription,
@ -15,7 +16,7 @@ import ManageSubscriptionButton from './button';
interface Iprops {
subscription: Subscription;
closeModal: () => void;
setLoading: (value: boolean) => void;
setLoading: SetLoading;
}
export function ManageSubscription({

View file

@ -10,7 +10,7 @@ export type SelectedState = {
};
export type SetFiles = React.Dispatch<React.SetStateAction<EnteFile[]>>;
export type SetCollections = React.Dispatch<React.SetStateAction<Collection[]>>;
export type SetLoading = React.Dispatch<React.SetStateAction<Boolean>>;
export type SetLoading = React.Dispatch<React.SetStateAction<boolean>>;
export type SetCollectionSelectorAttributes = React.Dispatch<
React.SetStateAction<CollectionSelectorAttributes>
>;

View file

@ -7,7 +7,12 @@
"lib": ["dom", "dom.iterable", "esnext", "webworker"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"strict": true,
"strictBindCallApply": false,
"strictNullChecks": false,
"strictPropertyInitialization": false,
"noImplicitAny": false,
"useUnknownInCatchVariables": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,