<commit_before>import {Component} from '@angular/core';
import {typeScriptWithConsoleLog, withDeps} from '../../exercise/helpers/helpers';
import {ng2tsConfig} from '../../../../ng2ts/ng2ts';


@Component({
  selector: 'slides-typescript',
  templateUrl: './typescript.component.html',
  styleUrls: ['./typescript.component.css']
})

export class TypescriptComponent {
  code = {
    filter: typeScriptWithConsoleLog(`const numbers = [12,23,62,34,19,40,4,9];

console.log(numbers.filter(function(number){
  return number > 30;
}));

// Or use shorthand function notation.
// (Also called arrow function)
console.log(
  numbers.filter(number=>number > 30)
);`),
    moreTypes: {
      codeInterfaces: `interface Puppy {
  name: string;
  age: number;
};

const realPuppy: Puppy = {
  name: 'Pikachu',
  age: 1
};

const notRealPuppy: Puppy = {
  says: 'meow' // Error: this is clearly not a puppy
}`,
      codeArrays: typeScriptWithConsoleLog(`// define array as Array<Type>
const fruit: Array<string> = ['kiwi', 'fig'];
// Type[] does the same thing.
const moreFruit: string[] = ['kiwi', 'fig'];

interface Fruit {
  name: string,
  sweet: boolean
}
<commit_msg>Spacing for arrow function<commit_after>import {Component} from '@angular/core';
import {typeScriptWithConsoleLog, withDeps} from '../../exercise/helpers/helpers';
import {ng2tsConfig} from '../../../../ng2ts/ng2ts';


@Component({
  selector: 'slides-typescript',
  templateUrl: './typescript.component.html',
  styleUrls: ['./typescript.component.css']
})

export class TypescriptComponent {
  code = {
    filter: typeScriptWithConsoleLog(`const numbers = [12,23,62,34,19,40,4,9];

console.log(numbers.filter(function(number){
  return number > 30;
}));

// Or use shorthand function notation.
// (Also called arrow function)
console.log(
  numbers.filter(number => number > 30)
);`),
    moreTypes: {
      codeInterfaces: `interface Puppy {
  name: string;
  age: number;
};

const realPuppy: Puppy = {
  name: 'Pikachu',
  age: 1
};

const notRealPuppy: Puppy = {
  says: 'meow' // Error: this is clearly not a puppy
}`,
      codeArrays: typeScriptWithConsoleLog(`// define array as Array<Type>
const fruit: Array<string> = ['kiwi', 'fig'];
// Type[] does the same thing.
const moreFruit: string[] = ['kiwi', 'fig'];

interface Fruit {
  name: string,
  sweet: boolean
}

{'fraction_non_alphanumeric': 0.16488680051260146, 'fraction_numerical': 0.018795386586928663, 'mean_word_length': 4.135964912280702, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '7581880', 'n_tokens_mistral': 811, 'n_tokens_neox': 788, 'n_words': 200}