<commit_before>import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'showcase-demo',
  template: `
  <mgl-map
    style="mapbox://styles/mapbox/streets-v9"
    [zoom]="[15]"
    [center]="[-71.97722138410576, -13.517379300798098]"
  >
    <mgl-vector-source
      id="museums"
      url="mapbox://mapbox.2opop9hr"
    >
    </mgl-vector-source>
    <mgl-vector-source
      id="contours"
      url="mapbox://mapbox.mapbox-terrain-v2"
    >
    </mgl-vector-source>
    <mgl-layer
      id="museums"
      type="circle"
      source="museums"
      [layout]="layouts.museums"
      [paint]="{
        'circle-radius': 8,
        'circle-color': 'rgba(55,148,179,1)'
      }"
      sourceLayer="museum-cusco"
    >
    </mgl-layer>
    <mgl-layer
      id="contours"
      type="line"
      source="contours"
      [layout]="layouts.contours"
      [paint]="{
        'line-color': '#877b59',
        'line-width': 1
      }"
      sourceLayer="contour"
    >
    </mgl-layer>
  </mgl-map>
  <div class="menu">
    <mat-button-toggle [checked]="true" value="contours" (change)="toggleLayer($event)">contours</mat-button-toggle>
    <mat-button-toggle [checked]="true" value="museums" (change)="toggleLayer($event)">museums</mat-button-toggle>
  </div>
  `,
  styleUrls: ['./examples.css', './toggle-layers.component.css']
})
export class ToggleLayersComponent implements OnInit {
  layouts = {
    contours: {
      'visibility': 'visible',
      'line-join': 'round',
      'line-cap': 'round'
    },
    museums: {
      'visibility': 'visible'
    }
  };

  ngOnInit() {
  }

  toggleLayer(evt: { value: 'contours' | 'museums' }) {
    this.layouts[evt.value] = {
      ...this.layouts[evt.value],
      visibility: this.layouts[evt.value].visibility === 'visible' ? 'none' : 'visible'
    };
  }
}
<commit_msg>fix: make sure showcase works with TypeScript 3.5.3<commit_after>import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'showcase-demo',
  template: `
  <mgl-map
    style="mapbox://styles/mapbox/streets-v9"
    [zoom]="[15]"
    [center]="[-71.97722138410576, -13.517379300798098]"
  >
    <mgl-vector-source
      id="museums"
      url="mapbox://mapbox.2opop9hr"
    >
    </mgl-vector-source>
    <mgl-vector-source
      id="contours"
      url="mapbox://mapbox.mapbox-terrain-v2"
    >
    </mgl-vector-source>
    <mgl-layer
      id="museums"
      type="circle"
      source="museums"
      [layout]="layouts.museums"
      [paint]="{
        'circle-radius': 8,
        'circle-color': 'rgba(55,148,179,1)'
      }"
      sourceLayer="museum-cusco"
    >
    </mgl-layer>
    <mgl-layer
      id="contours"
      type="line"
      source="contours"
      [layout]="layouts.contours"
      [paint]="{
        'line-color': '#877b59',
        'line-width': 1
      }"
      sourceLayer="contour"
    >
    </mgl-layer>
  </mgl-map>
  <div class="menu">
    <mat-button-toggle [checked]="true" value="contours" (change)="toggleLayer($event)">contours</mat-button-toggle>
    <mat-button-toggle [checked]="true" value="museums" (change)="toggleLayer($event)">museums</mat-button-toggle>
  </div>
  `,
  styleUrls: ['./examples.css', './toggle-layers.component.css']
})
export class ToggleLayersComponent implements OnInit {
  layouts = {
    contours: {
      'visibility': 'visible',
      'line-join': 'round',
      'line-cap': 'round'
    },
    museums: {
      'visibility': 'visible'
    }
  };

  ngOnInit() {
  }

  toggleLayer(evt: { value: 'contours' | 'museums' }) {
    // HACK: work around TypeScript compiler warning by casting to 'any'
    this.layouts[evt.value] = <any>{
      ...this.layouts[evt.value],
      visibility: this.layouts[evt.value].visibility === 'visible' ? 'none' : 'visible'
    };
  }
}

{'fraction_non_alphanumeric': 0.18954593453009505, 'fraction_numerical': 0.02983104540654699, 'mean_word_length': 2.6893865628042843, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1115861', 'n_tokens_mistral': 1488, 'n_tokens_neox': 1405, 'n_words': 196}