Просмотр исходного кода

[web] Fix main branch linting error (#21749)

* Sync package-lock

I get this change when running `make install && bin/npm i`

* Add `featureUsage` to LoggedOutUser keys

We might want to change this to something like this:

```
export type NullifyProperties<T> = {
  [P in keyof T]: undefined
}

export type LoggedOutUser = {
  id: null
} & NullifyProperties<Omit<User, 'id'>>
```

* Revert "Sync package-lock"

This reverts commit 982466eba3f8d72a388d248b66658be0350b2d09.

* Remove `canceledSubscription` types for now

This is breaking the build at the moment. We can work on creating a `Request` that matches our usages of it

GitOrigin-RevId: bb21baba6a074c2169af786a9e56b33beddddd2f
Antoine Clausse 1 год назад
Родитель
Сommit
5821dc7273

+ 0 - 3
services/web/app/src/Features/Subscription/SubscriptionController.js

@@ -457,9 +457,6 @@ function cancelSubscription(req, res, next) {
 }
 
 /**
- * @param {import('express').Request} req
- * @param {import('express').Response} res
- * @param {import('express').NextFunction} next
  * @returns {Promise<void>}
  */
 async function canceledSubscription(req, res, next) {

+ 1 - 0
services/web/types/user.ts

@@ -68,6 +68,7 @@ export type LoggedOutUser = {
   refProviders?: undefined
   writefull?: undefined
   isAdmin?: undefined
+  featureUsage?: undefined
 }
 
 export type MongoUser = Pick<User, Exclude<keyof User, 'id'>> & { _id: string }