A few findings from experimenting with isolated declarations:
Exported variables will need an explicit type annotation (✅ implemented).
export const c1: 1 = 1; // ✔ ok, is explicit
type SchemaEntry<A, B extends keyof A> = | |
| Validator<A[B]> | |
| ((obj: Id<A>) => Validator<A[B]>); | |
type Schema<A extends object> = { [k in keyof A]: SchemaEntry<A, k> }; | |
class Result<T> {} |
enum Option { Some = 1, Empty = 2 } | |
type DistributeOptionValue<T> = T extends null | undefined ? OptionValue<T, Option.Empty> : OptionValue<T, Option.Some>; | |
interface OptionValue<T, O extends Option> { | |
option: O; | |
value: T; | |
} | |
function getValue<T>(value: T): DistributeOptionValue<T> | |
function getValue<T>(value: T): OptionValue<T, Option> { | |
return ({ |
[ | |
{ | |
"license": "ABC123", | |
"type": "drone", | |
"model": "Amazon 1250", | |
"airTimeHours": "6050", | |
"base": "New York", | |
"latLong": "40.775596 -73.97461" | |
}, | |
{ |
[ | |
{ | |
"license": "ABC123", | |
"type": "drone", | |
"model": "Amazon 1250", | |
"airTimeHours": "6050", | |
"base": "New York", | |
"latLong": "40.775596 -73.97461" | |
}, | |
{ |
[ | |
{ | |
"productId": 1, | |
"productName": "Leaf Rake", | |
"productCode": "GDN-0011", | |
"releaseDate": "March 19, 2019", | |
"description": "Leaf rake with 48-inch wooden handle.", | |
"price": 19.95, | |
"starRating": 3.2, | |
"imageUrl": "assets/images/leaf_rake.png" |
<?xml version="1.0"?> | |
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd" xmlns:yca="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:ycns="http://www.yworks.com/xml/yfiles-compat-node-styles/1.0" xmlns:yjs2="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:demostyle2="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/2.0" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:icon-style="http://www.yworks.com/yed-live/icon-style/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:GraphvizNodeStyle="http://www.yworks.com/yFilesHTML/graphviz-node-style/1.0" xmlns:Vue2jsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node |
<?xml version="1.0"?> | |
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml.html/2.0/ygraphml.xsd" xmlns:yca="http://www.yworks.com/xml/yfiles-compat-arrows/1.0" xmlns:ycns="http://www.yworks.com/xml/yfiles-compat-node-styles/1.0" xmlns:yjs2="http://www.yworks.com/xml/yfiles-for-html/2.0/xaml" xmlns:demostyle2="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/2.0" xmlns:demostyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoStyle/1.0" xmlns:icon-style="http://www.yworks.com/yed-live/icon-style/1.0" xmlns:bpmn="http://www.yworks.com/xml/yfiles-bpmn/2.0" xmlns:demotablestyle="http://www.yworks.com/yFilesHTML/demos/FlatDemoTableStyle/1.0" xmlns:uml="http://www.yworks.com/yFilesHTML/demos/UMLDemoStyle/1.0" xmlns:GraphvizNodeStyle="http://www.yworks.com/yFilesHTML/graphviz-node-style/1.0" xmlns:Vue2jsNodeStyle="http://www.yworks.com/demos/yfiles-vuejs-node |