How to use the type.Warning function in type

To help you get started, we’ve selected a few type examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github basisjs / basisjs / src / devpanel / view / warnings / view / index.js View on Github external
var STATE = require('basis.data').STATE;
var Value = require('basis.data').Value;
var DataObject = require('basis.data').Object;
var Node = require('basis.ui').Node;
var KeyObjectMap = require('basis.data').KeyObjectMap;
var Split = require('basis.data.dataset').Split;
var Filter = require('basis.data.dataset').Filter;
var count = require('basis.data.index').count;
var Warning = require('type').Warning;
var fileApi = require('api').ns('file');

var warningsByType = new Split({
  source: Warning.all,
  rule: function(item){
    return basis.path.extname(item.data.file);
  }
});

var fatalWarnings = new Filter({
  source: Warning.all,
  rule: 'data.fatal'
});

var StatItem = Node.subclass({
  fatal: false,
github basisjs / basisjs / src / devpanel / view / warnings / tab.js View on Github external
var count = require('basis.data.index').count;
var Warning = require('type').Warning;

module.exports = {
  caption: 'Warnings',
  view: resource('./view/index.js'),

  template: resource('./tab.tmpl'),
  binding: {
    count: count(Warning.all)
  }
};