Skip to content

Instantly share code, notes, and snippets.

@nyarla nyarla/README.md Secret
Last active Jun 22, 2016

Embed
What would you like to do?
(OBSOLETED) This code is no longer maintenance
import "js/web.jsx";
import "js.jsx";
native class Vue {
function constructor( options : variant );
function el() : HTMLElement ;
function parent() : Vue ;
function root() : Vue ;
function compiler() : variant ;
function hold() : variant ;
function set( key : string, val : variant ) : void ;
function watch( key : string, callback : variant ) : void ;
function unwatch( key : string, callbacl : variant ) : void ;
function destory() : void ;
function broadcast() : void ;
function dispatch() : void ;
function emit( method : string ) : void ;
function on( method : string ) : void ;
function off( method : string ) : void ;
function once( method : string ) : void ;
function appendTo( target : variant, callback : variant ) : void ;
function remove( callback : variant ) : void ;
function before( target : variant, callback : variant ) : void ;
function after( target : variant, callback : variant ) : void ;
static function extend( options : variant ) : Vue ;
static function config( key : string, value : variant ) : variant ;
static function config( key : string ) : variant ;
static function config( options : variant ) : variant ;
static function directive( id : string, definition : variant ) : variant ;
static function directive( id : string ) : variant ;
static function filter( id : string, definition : variant ) : variant ;
static function filter( id : string ) : variant ;
static function component( id : string, definition : variant ) : variant ;
static function component( id : string ) : variant ;
static function transition( id : string, definition : variant ) : variant ;
static function transition( id : string ) : variant ;
static function partial( id : string, definition : variant ) : variant ;
static function partial( id : string ) : variant ;
static function nextTick( callback : variant ) : variant ;
static function require( module : string ) : variant ;
static function use( plugin : variant ) : variant ;
} = '''
(function() {
Vue = window.Vue;
VueProto = Vue.prototype;
'set watch unwatch destory broadcast dispatch emmit on off once appendTo remove before after'.split(' ').forEach(function ( key ) {
VueProto[key] = VueProto[ '$' + key ];
});
'data index'.split(' ').forEach(function ( name ) {
VueProto[name] = function ( val ) {
if ( typeof(val) === 'undefined' ) {
return this['$' + name];
} else {
return this['$' + name] = val;
}
}
});
'el parent root compiler'.split(' ').forEach(function ( name ) {
VueProto[name] = function () {
return this['$' + name];
}
});
VueProto['hold'] = function () {
return this['$'];
}
return Vue;
})();
''';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.