Support a type representing any literal string, a la Python's LiteralString type · Issue #51513 · microsoft/TypeScript · GitHub
![Python Language Grammar Literals Numeric Literals Integer, Floating Point Number, Imaginary Literals 23/4 Sideway output.to Python Language Grammar Literals Numeric Literals Integer, Floating Point Number, Imaginary Literals 23/4 Sideway output.to](http://output.to/sideway/images/computer/software/programming/desktop/python/001/python_integer_literal_hexadecimal_001a.png)
Python Language Grammar Literals Numeric Literals Integer, Floating Point Number, Imaginary Literals 23/4 Sideway output.to
![Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science](https://miro.medium.com/v2/resize:fit:1400/1*RpZAskwPsoHxB-waUWkp7A.png)
Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science
![Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science](https://miro.medium.com/v2/resize:fit:1400/1*PlNMhf7GQwCOVQyBJ5awew.png)
Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science
![TestDriven.io on X: "Python tip: You can use *Literal* to indicate that value can be one of provided literals Static type checking reports error when unlisted value is used #Python https://t.co/0cRpvaA3RT" / TestDriven.io on X: "Python tip: You can use *Literal* to indicate that value can be one of provided literals Static type checking reports error when unlisted value is used #Python https://t.co/0cRpvaA3RT" /](https://pbs.twimg.com/media/EoGTvFiXcAAlntT.jpg:large)
TestDriven.io on X: "Python tip: You can use *Literal* to indicate that value can be one of provided literals Static type checking reports error when unlisted value is used #Python https://t.co/0cRpvaA3RT" /
![Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science Python Type Hinting with Literal. More powerful than it seems: use… | by Marcin Kozak | Towards Data Science](https://miro.medium.com/v2/resize:fit:1312/1*NrKPXwa7Qy1HGD9zJXPtRA.png)