Now implicitly adding abstract keyword for interface method declarations
parent
bdc32906e7
commit
ba28f0a753
|
@ -297,8 +297,11 @@ exports.propParse = function( data, options )
|
||||||
name = parse_data.name || prop;
|
name = parse_data.name || prop;
|
||||||
keywords = parse_data.keywords || {};
|
keywords = parse_data.keywords || {};
|
||||||
|
|
||||||
if ( options.assumeAbstract || keywords['abstract'] )
|
if ( options.assumeAbstract || keywords[ 'abstract' ] )
|
||||||
{
|
{
|
||||||
|
// may not be set if assumeAbstract is given
|
||||||
|
keywords[ 'abstract' ] = true;
|
||||||
|
|
||||||
if ( !( value instanceof Array ) )
|
if ( !( value instanceof Array ) )
|
||||||
{
|
{
|
||||||
throw TypeError(
|
throw TypeError(
|
||||||
|
|
|
@ -31,12 +31,13 @@ var common = require( './common' ),
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
// test with and without abstract keyword
|
||||||
var Type = Interface.extend( {
|
var Type = Interface.extend( {
|
||||||
'abstract foo': [],
|
'abstract foo': [],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Type2 = Interface.extend( {
|
Type2 = Interface.extend( {
|
||||||
'abstract foo2': [],
|
foo2: [],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Foo = {},
|
Foo = {},
|
||||||
|
|
Loading…
Reference in New Issue