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

Failed to resolve index type into finite keys #5199

Closed
laterdayi opened this issue Sep 1, 2023 · 2 comments
Closed

Failed to resolve index type into finite keys #5199

laterdayi opened this issue Sep 1, 2023 · 2 comments
Labels
untriaged need to sort

Comments

@laterdayi
Copy link

TuSimple/naive-ui version (版本)

2.34.4

Vue version (Vue 版本)

3.3.4

Browser and its version (浏览器及其版本)

chrome118

System and its version (系统及其版本)

window

Node version (Node 版本)

Reappearance link (重现链接)

https://codesandbox.io/s/u6w4gh

Reappearance steps (重现步骤)

Failed to resolve index type into finite keys

Expected results (期望的结果)

<script setup lang="ts">
import type { InputNumberProps } from 'naive-ui';
const { componentProps } = defineProps<InputNumberProps>();
const slots = useSlots();
</script>
[vite] Internal server error: [@vue/compiler-sfc] Failed to resolve index type into finite keys

E://node_modules/naive-ui/es/_utils/naive/extract-public-props.d.ts        
3  |  type themePropKeys = keyof typeof useTheme.props;
4  |  type RemoveReadonly<T> = {
5  |      -readonly [key in keyof T]: T[key];
   |                        ^^^^^^^
6  |  };
7  |  export type ExtractPublicPropTypes<T> = Omit<Partial<RemoveReadonly<ExtractPropTypes<T>>>, Exclude<themePropKeys, 'themeOverrides'> | Extract<keyof T, `internal${string}`>>; 

Actual results (实际的结果)

Fix this error, otherwise Support imported types in SFC macros seems pointless

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Sep 1, 2023
@laterdayi
Copy link
Author

Whether should support vuejs/core#8083

@MengLizhi
Copy link

Have the same problem

@jahnli jahnli closed this as completed Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

No branches or pull requests

3 participants