Skip to content

Instantly share code, notes, and snippets.

View atrunelle's full-sized avatar

Aurore T atrunelle

View GitHub Profile
@atrunelle
atrunelle / interfaces-example.ts
Created June 26, 2018 15:11
Typescript interface and readability
export interface IAnswer {
answer: string;
description: string;
}
export interface IFunFact {
text: string;
number: number | string;
}
@atrunelle
atrunelle / check-equals.ts
Created June 26, 2018 14:29
Check strings equals TS
// TypeScript
function isEqual(a: string, b: string): boolean {
return a === b;
}
@atrunelle
atrunelle / check-string-equals.js
Last active June 26, 2018 14:29
Check strings equals - JSdoc
// JSDOC
/**
* Check 2 strings are equals
* @param {string} a
* @param {string} b
* @return {boolean}
*/
function isEqual(a, b) {
return a === b;
}