@@ -38,7 +38,7 @@ export interface LanguageService {
3838 configure ( settings : LanguageSettings ) : void ;
3939 doValidation ( document : TextDocument , jsonDocument : JSONDocument , documentSettings ?: DocumentLanguageSettings , schema ?: JSONSchema ) : PromiseLike < Diagnostic [ ] > ;
4040 parseJSONDocument ( document : TextDocument ) : JSONDocument ;
41- newJSONDocument ( rootNode : ASTNode , syntaxDiagnostics ?: Diagnostic [ ] ) : JSONDocument ;
41+ newJSONDocument ( rootNode : ASTNode | undefined , syntaxDiagnostics ?: Diagnostic [ ] , comments ?: Range [ ] ) : JSONDocument ;
4242 resetSchema ( uri : string ) : boolean ;
4343 getMatchingSchemas ( document : TextDocument , jsonDocument : JSONDocument , schema ?: JSONSchema ) : PromiseLike < MatchingSchema [ ] > ;
4444 getLanguageStatus ( document : TextDocument , jsonDocument : JSONDocument ) : JSONLanguageStatus ;
@@ -79,7 +79,7 @@ export function getLanguageService(params: LanguageServiceParams): LanguageServi
7979 doValidation : jsonValidation . doValidation . bind ( jsonValidation ) ,
8080 getLanguageStatus : jsonValidation . getLanguageStatus . bind ( jsonValidation ) ,
8181 parseJSONDocument : ( document : TextDocument ) => parseJSON ( document , { collectComments : true } ) ,
82- newJSONDocument : ( root : ASTNode , diagnostics : Diagnostic [ ] ) => newJSONDocument ( root , diagnostics ) ,
82+ newJSONDocument : ( root : ASTNode | undefined , diagnostics ? : Diagnostic [ ] , comments ?: Range [ ] ) => newJSONDocument ( root , diagnostics , comments ) ,
8383 getMatchingSchemas : jsonSchemaService . getMatchingSchemas . bind ( jsonSchemaService ) ,
8484 doResolve : jsonCompletion . doResolve . bind ( jsonCompletion ) ,
8585 doComplete : jsonCompletion . doComplete . bind ( jsonCompletion ) ,
0 commit comments