Convert typing declarations to use TypeAlias
See original GitHub issueSee discussion here: https://github.com/pandas-dev/pandas-stubs/pull/341#issuecomment-1262928643
Should we change _typing.pyi
to make all these types that we create be declared with TypeAlias
(imported from typing_extensions
) ?
@twoertwein - your opinion?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How To Use Type Aliases in TypeScript - DigitalOcean
Using the type alias can solve this. Step 2 — Using Type Alias. To implement the type alias, use the type keyword to...
Read more >Types: Type Aliases - HHVM and Hack Documentation
A type alias can be created in two ways: using type and newtype . type Complex = shape('real' => float, 'imag' => float);...
Read more >How to use a Typescript type alias of a function type on a ...
I have this type alias with a function type. type ADD_FUNCTION = (x: number, y: number) => number;. I can do this:
Read more >Expected meaning of `<Alias>: typing.TypeAlias = typing ...
from typing import TypeAlias, ClassVar, get_type_hints ClassAlias: TypeAlias = ClassVar[str] class A: i: ClassAlias = "g" # No errors class ...
Read more >Swift typealias: What is it and when to use it - Sarunw
Type alias declarations are declared using the typealias keyword and have the following form: typealias name = existing type.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fun fact: typeshed pretends that
typing_extensions
is part of the standard library, meaning that all type checkers also believe thattyping_extensions
is part of the standard library. This means that (since this is a stubs-only project, and will never be executed at runtime) you should be able to use types fromtyping_extensions
(and also_typeshed
, which we treat similarly) without adding a dependency ontyping_extensions
😃Could also start using
_typeshed.Self
in the stubs (Y019) @Dr-Irv