One of my tricks for quickly obtaining typings involves deriving them from actual data:
https://i.stack.imgur.com/EPtMm.png
I typically use a snippet like this:
const ParcelFeatureTypeInstance = {"displayFieldName":"NAMECO","fieldAliases":{"PIN":"PIN / Tax Map #","OWNAM1":"Owner Name(MixedCase)",...};
type ParcelFeatureType = typeof ParcelFeatureTypeInstance;
However, I want to enhance this method by being able to copy and paste the complete type definition. Currently, when I hover over the type, a popup window appears with an incomplete definition:
const ParcelFeatureTypeInstance: {
displayFieldName: string;
fieldAliases: {
PIN: string;
OWNAM1: string;
OWNAM2: string;
STREET: string;
CITY: string;
STATE: string;
ZIP5: string;
NAMECO: string;
POWNNM: string;
DEEDDATE: string;
CUBOOK: string;
... 23 more ...;
OBJECTID: string;
};
geometryType: string;
spatialReference: {
...;
};
fields: ({
...;
} | {
...;
})[];
features: {
...;
}[];
}
I am wondering if there is a way to access the full type definition in a more convenient manner.