From 1bcd371e6076a30724b45f653c840205e772cee1 Mon Sep 17 00:00:00 2001 From: davetayls Date: Thu, 29 Jan 2015 09:28:44 +0000 Subject: [PATCH] added getOption to view --- marionette/marionette-tests.ts | 1 + marionette/marionette.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/marionette/marionette-tests.ts b/marionette/marionette-tests.ts index c758378105..a37eccc9f8 100644 --- a/marionette/marionette-tests.ts +++ b/marionette/marionette-tests.ts @@ -96,6 +96,7 @@ module Marionette.Tests { constructor() { super(); + this.getOption('foo'); this.triggers = { 'click .foo': 'bar' }; diff --git a/marionette/marionette.d.ts b/marionette/marionette.d.ts index 40c0f6775d..363d4142a1 100644 --- a/marionette/marionette.d.ts +++ b/marionette/marionette.d.ts @@ -721,6 +721,12 @@ declare module Marionette { getTemplate(): any; + /** + * Retrieve an object's attribute either directly from the object, or + * from the object's this.options, with this.options taking precedence. + */ + getOption(optionName:string): T; + mixinTemplateHelpers(target?: any): any; configureTriggers(): any;