You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Тайпинг 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>'.
Тайпинг
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
The text was updated successfully, but these errors were encountered: