Skip to content

Instantly share code, notes, and snippets.

@tomasperezv
Created November 13, 2016 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasperezv/edc9563035b36b535a981c7ae3b96e64 to your computer and use it in GitHub Desktop.
Save tomasperezv/edc9563035b36b535a981c7ae3b96e64 to your computer and use it in GitHub Desktop.
/**
* Uses a map for keeping track of access and set operations.
*/
_registerAccess(propertyName: string, isDefined: boolean): void {
let register = {
count: 0,
called: false,
isDefined
};
register.count++;
register.called = true;
this._spyMap.set(propertyName, register);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment