- Forums
- Typescript
- Different Example Of Assigning Typescript Types Arrays Objects Variables Etc.
This page contains example on how to use Typescript Types for Arrays Objects Variables and other examples. [5211], Last Updated: Wed Sep 27, 2023
cathy
Sat Sep 16, 2023
0 Comments
27 Visits
IONIC EXAMPLES:
Interface
interface AppPage {
url: string;
iosIcon: string;
mdIcon: string;
title: string;
}
const appPages: AppPage[] = [
{
title: "Inbox",
url: "/page/Inbox",
iosIcon: mailOutline,
mdIcon: mailSharp,
},
Interface with props
interface ContainerProps {
name: string;
}
const ExploreContainer: React.FC<ContainerProps> = ({ name }) => {
return (
<div>
...{name}
</div>
);
};
for (let [fieldName, field] of Object.entries<any>(form)) {
const canvasRef = useRef<any>();