Author: Kevin Valmorbida
A class should have a single responsibility. Not more than one job or a strict subset of it should be done by a class.
/** | |
* A pipe used to console log an object. | |
*/ | |
@Pipe({ | |
name: 'log', | |
}) | |
export class LogPipe implements PipeTransform { | |
public transform(object: any) { | |
console.log(object); | |
} |
.fade-in-10 { | |
animation: fadeIn 0.1s; | |
} | |
.fade-in-30 { | |
animation: fadeIn 0.3s; | |
} | |
.fade-in-50 { | |
animation: fadeIn 0.5s; | |
} | |
.fade-in-100 { |
Author: Kevin Valmorbida
A class should have a single responsibility. Not more than one job or a strict subset of it should be done by a class.
using System; | |
namespace FooBar.Models; | |
public class Foo | |
{ | |
public string Name { get; set; } | |
public Foo(Action<Foo> options) // CS8618 | |
{ |
export class Entity { | |
public name: string; | |
public description: string; | |
constructor(options: (entity: Entity) => void) | |
{ | |
options(this); | |
} | |
} |