Označí triedu prázdnym rozhraním, podľa ktorého sa dá rozhodovať za behu.
// An empty marker. It has no method at all — it carries only membership.class Backupable {} class Document extends Backupable { constructor(text) { super(); this.text = text; }} class Image extends Backupable { constructor(pixels) { super(); this.pixels = pixels; }} class TempData { constructor(value) { this.value = value; }} class BackupService { backup(items) { for (const item of items) { if (item instanceof Backupable) { this.save(item); } } }} new BackupService().backup([ new Document('contract'), new Image(pixels), new TempData(42), // not marked, gets skipped]);