Skip to content

Instantly share code, notes, and snippets.

interface InterfaceWithOptional {
foo?: number;
}
interface InterfaceWithUndefined {
foo: number | undefined;
}
function getInterfaceWithOptional(): InterfaceWithOptional { ... }
const x: InterfaceWithUndefined = getInterfaceWithOptional(); // Error!
interface InterfaceWithUndefined {
foo: number | undefined;
}
interface InterfaceWithOptional {
foo?: number;
}
{
"name": "Water Observations from Space 25m Clear Count (WOfS Statistics)",
"type": "wms",
"layers": "wofs_summary_clear",
"url": "https://ows.services.dea.ga.gov.au/",
"linkedWcsUrl": "https://ows.services.dea.ga.gov.au/",
"linkedWcsCoverage": "wofs_summary_clear",
"ignoreUnknownTileErrors": true,
"opacity": 1
}
{
"catalog": [
{
"type": "csv",
"name": "Postcode / Count",
"url": "https://gist.githubusercontent.com/wongj/a669a344a25f961884358938c3a58a29/raw/25bf03aa814423624704b58a99ab5bc4b403fd3d/a.csv",
"isEnabled": true,
"tableStyle": {
"colorBinMethod": "ckmeans"
}
{
"homeCamera": {
"north": -8,
"east": 158,
"south": -45,
"west": 109
},
"catalog": [
{
"name": "Test group",
{
"catalog": [
{
"type": "group",
"name": "Example Group",
"isOpen": true,
"items": [
{
"name": "Simple Example",
"type": "terria-json",
Longitude Latitude Some Value
151 -33 1
151 -32 2
@kring
kring / fix-analytics.json
Created September 6, 2016 00:18
Fix the analytics on newui.terria.io
{
"catalog": [
{
"name": "Terria Analytics",
"items": [
{
"name": "Regions like this",
"url": "http://analytics.terria.io:31113/jobs"
},
{