I have a JSON string as shown below:
"authConfig": {
"context": "internal",
"environment": "local",
},
Meanwhile, the type of authConfig is
export interface AuthConfig<APP = App> {
environment?: TokenEnv;
context: AuthContext;
}
And also the AuthContext is:
export declare type AuthContext = 'internal' | 'external';
However, when I use the JSONS string in my test file, it shows the below error:
The types of 'authConfig.context' are incompatible between these types. Type 'string' is not assignable to type 'AuthContext'.ts(2345)
May I please know what the value I can assign to context in JSON object to resolve this type issue? Thanks