@@ -527,7 +527,15 @@ api.createTermDefinition = ({
527527 { code : 'invalid type mapping' , context : localCtx } ) ;
528528 }
529529
530- if ( type !== '@id' && type !== '@vocab' && type !== '@json' ) {
530+ if ( ( type === '@json' || type === '@none' ) ) {
531+ if ( api . processingMode ( activeCtx , 1.0 ) ) {
532+ throw new JsonLdError (
533+ 'Invalid JSON-LD syntax; an @context @type value not be ' +
534+ '#{type} in JSON-LD 1.0 mode.' ,
535+ 'jsonld.SyntaxError' ,
536+ { code : 'invalid type mapping' , context : localCtx } ) ;
537+ }
538+ } else if ( type !== '@id' && type !== '@vocab' ) {
531539 // expand @type to full IRI
532540 type = _expandIri (
533541 activeCtx , type , { vocab : true , base : false } , localCtx , defined ,
@@ -959,6 +967,10 @@ api.getInitialContext = options => {
959967 if ( mapping . reverse ) {
960968 // term is preferred for values using @reverse
961969 _addPreferredTerm ( term , entry [ '@type' ] , '@reverse' ) ;
970+ } else if ( mapping [ '@type' ] === '@none' ) {
971+ _addPreferredTerm ( term , entry [ '@any' ] , '@none' ) ;
972+ _addPreferredTerm ( term , entry [ '@language' ] , '@none' ) ;
973+ _addPreferredTerm ( term , entry [ '@type' ] , '@none' ) ;
962974 } else if ( '@type' in mapping ) {
963975 // term is preferred for values using specific type
964976 _addPreferredTerm ( term , entry [ '@type' ] , mapping [ '@type' ] ) ;
0 commit comments