Path: blob/main/third_party/closure-compiler/node-externs/string_decoder.js
6174 views
/*1* Copyright 2012 The Closure Compiler Authors.2*3* Licensed under the Apache License, Version 2.0 (the "License");4* you may not use this file except in compliance with the License.5* You may obtain a copy of the License at6*7* http://www.apache.org/licenses/LICENSE-2.08*9* Unless required by applicable law or agreed to in writing, software10* distributed under the License is distributed on an "AS IS" BASIS,11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12* See the License for the specific language governing permissions and13* limitations under the License.14*/1516/**17* @fileoverview Definitions for node's string_decoder module. Depends on the buffer module.18* @see http://nodejs.org/api/string_decoder.html19* @see https://github.com/joyent/node/blob/master/lib/string_decoder.js20* @externs21* @author Daniel Wirtz <[email protected]>22*/2324/**25BEGIN_NODE_INCLUDE26var StringDecoder = require('string_decoder');27END_NODE_INCLUDE28*/2930/**31* @param {string} encoding32* @constructor33*/34var StringDecoder = function(encoding) {};3536/**37* @param {nodeBuffer.Buffer} buffer38* @return {string}39*/40StringDecoder.prototype.write = function(buffer) {};4142/**43* @return {string}44*/45StringDecoder.prototype.toString = function() {};4647/**48* @param {nodeBuffer.Buffer} buffer49* @return {number}50*/51StringDecoder.prototype.detectIncompleteChar = function(buffer) {};5253/**54* @param {nodeBuffer.Buffer} buffer55* @return {string}56*/57StringDecoder.prototype.end = function(buffer) {};585960