Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ Engine.tokenGetAll = function (buffer, options) {
/**
* Extract tokens from the specified buffer.
* > Note that the output tokens are *STRICLY* similar to PHP function `token_get_all`
* @param {String} buffer
* @return {String[]} - Each item can be a string or an array with following informations [token_name, text, line_number]
* @param {string} buffer
* @return {Array<string|string[]>} - Each item can be a string or an array with following informations [token_name, text, line_number]
*/
Engine.prototype.tokenGetAll = function (buffer) {
this.lexer.mode_eval = false;
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ declare module "php-parser" {
* > Note that the output tokens are *STRICLY* similar to PHP function `token_get_all`
* @returns - Each item can be a string or an array with following informations [token_name, text, line_number]
*/
tokenGetAll(buffer: string): String[];
tokenGetAll(buffer: string): (string | string[])[];
lexer: Lexer;
parser: Parser;
ast: AST;
Expand Down