Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkloubert committed Jul 24, 2017
1 parent 12f11ac commit 930a3d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2625,16 +2625,6 @@ export interface TemplateItem {
* An object with a list of template items.
*/
export type TemplateItemList = {
/**
* The minimum version of that extension
* that is required to display the items
* of that list.
*/
'$requires$'?: string;
/**
* The version of that list.
*/
'$version$'?: string;
/**
* Gets an item by its name.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function extractTemplateItems(list: deploy_contracts.TemplateItemList,
let items: TemplateItemWithName[] = [];

if (list) {
if (checkForExtensionVersion(list['$requires$'], packageFile)) {
if (checkForExtensionVersion(<any>list['$requires$'], packageFile)) {
for (let name in list) {
if (REGEX_SPECIAL_PROPERTY.test(name)) {
continue; // ignore
Expand Down Expand Up @@ -904,7 +904,7 @@ export function openTemplate() {
};

wf.start().then((list: deploy_contracts.TemplateItemList) => {
if (checkForExtensionVersion(list['$requires$'], me.packageFile)) {
if (checkForExtensionVersion(<any>list['$requires$'], me.packageFile)) {
showItems(extractTemplateItems(list, me.packageFile));
}
else {
Expand Down

0 comments on commit 930a3d2

Please sign in to comment.