feat: type for supported data (only primitives)
This commit is contained in:
parent
0eb4f3c636
commit
0c9d64c28c
2 changed files with 5 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
|||
---
|
||||
type Primitive = string | number | boolean | null | undefined;
|
||||
export interface Props {
|
||||
id: string;
|
||||
data: Object;
|
||||
data: Record<string, Primitive>;
|
||||
}
|
||||
const {id, data} = Astro.props;
|
||||
---
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
import Resumable from '../Resumable.astro';
|
||||
const data = {
|
||||
hello: 'world'
|
||||
};
|
||||
name: 'John Doe',
|
||||
isOkay: true,
|
||||
}
|
||||
export type Data = typeof data;
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in a new issue