Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавить any для ключей в тип deps #11

Open
dj-stormtrooper opened this issue Jul 29, 2020 · 0 comments
Open

Добавить any для ключей в тип deps #11

dj-stormtrooper opened this issue Jul 29, 2020 · 0 comments

Comments

@dj-stormtrooper
Copy link
Contributor

Тайпинг Record<symbol, any> сам по себе не сильно полезный, но из-за symbol в ключе добавляет неудобств, приходится кастовать везде в any из-за Element implicitly has an 'any' type because expression of type 'symbol' can't be used to index type 'Record<symbol, any>'.

пример https://www.typescriptlang.org/play/index.html#code/JYWwDg9gTgLgBAEwKZwGZQiOByZBnAYymDBmwG4AoS5AOlQFcA7AgCgG9K5u4AjAGwgEA1gC44rAIZQA5ngCUcALwA+OJx6a4BCEzzw8ATxC8I-YAQAiSMHgCSCZXGlyA-LRlImSKJJhIAfWAEVkVJPDgjEzNyOAB6OLhAIRBAYRAkuEAuEEAGEEBBEHTADhBAdhAAWkKsuEA+EEB+EEAxEHyKwF4QLMBuEEAZEAbAaRBAURBnWTxqLR4oJBgGKCZEJFoIXgArJAIYDi5BrQEhMXUV1dX1kQBGcTpGFmWd8549zdDlNX2AGm2L1YhSYF08cXY4YPEo03MVhs9kcAF8ns84KD5I9IZorgAmI5TE5sDRwwZXcQ3VRwBGwjFaV4wd56L4QwmaZC2cQAbX+Zgs1lsDgAugTKYMwNJJCBPhJvtSItDbpNbHAAGQSsV4enGAFM4FsikY8GU6EqrRq1YazTg6FAA

предлагаю сразу оставить any для deps, чтобы не кастовать везде руками
тут детально про symbol в качестве ключа microsoft/TypeScript#1863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant