export class ResourceSet { src : string ; data : any ; constructor ( src ) { this . src = src ; } init ( data ) { this . data = data ; } async load ( ) { await fetch ( this . src ) . then ( response => response . json ( ) ) . then ( data => this . init ( data ) ) ; } }