TypeScript - Reconsider RequestInfo
class name as the name is built-in in the language
#551
Labels
Milestone
RequestInfo
class name as the name is built-in in the language
#551
RequestInfo
is defined in the TypeScript library as follows:Please check my question on StackOverFlow for more info: https://stackoverflow.com/questions/68970860/typescript-using-predefined-names-for-custom-class-names.
The following prompts a
Duplicate Identifier
error :However, adding the
export
keywordexport class RequestInfo
removes the error. I learnt from the TS community that reusing a built-in name is not recommended.Additionally, use
HTTPContext
orMiddlewareContext
which would be the conventional term for the purpose of this class. Examples:GraphRequestContext
in Graph dot net core,RequestContext
-> https://github.com/microsoftgraph/msgraph-sdk-design/blob/master/middleware/RequestContext.md,HTTPContext
- https://docs.microsoft.com/en-us/dotnet/api/system.web.httpcontext?view=netframework-4.8AB#10917
The text was updated successfully, but these errors were encountered: