Skip to content

Commit 6494442

Browse files
committed
fix props types
1 parent f60f6f2 commit 6494442

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/components/code-block/CodeBlock.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626

2727
<script setup lang="ts">
2828
import { defineComponent, ref, toRefs } from 'vue';
29-
import { codeBlockProps, codeBlockInstance } from './types';
29+
import {
30+
codeBlockProps,
31+
codeBlockPropsTypes,
32+
codeBlockInstance
33+
} from './types';
3034
import { useCodeBlock } from './use-code-block';
3135
import { parseCodeIntoLines } from '../utils';
3236
@@ -36,7 +40,7 @@
3640
defineComponent<codeBlockInstance>({
3741
name: 'CodeBlock',
3842
props: codeBlockProps(),
39-
setup(props: codeBlockProps) {
43+
setup(props: codeBlockPropsTypes) {
4044
useCodeBlock(toRefs(props));
4145
},
4246
slots: { default: 'Default' }

src/components/code-block/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const codeBlockProps = () =>
6060
}
6161
} as const);
6262

63-
export type codeBlockProps = ExtractPropTypes<
63+
export type codeBlockPropsTypes = ExtractPropTypes<
6464
ReturnType<typeof codeBlockProps>
6565
>;
6666

@@ -70,7 +70,7 @@ export type codeBlockExpose = {
7070
};
7171

7272
export type codeBlockInstance = ComponentPublicInstance<
73-
codeBlockProps,
73+
codeBlockPropsTypes,
7474
codeBlockExpose
7575
>;
7676

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy