Closed ankisme closed 2 years ago
这个库的注释文字里本身就带有*/
,我也很无奈
这个注释是比较奇特没错,要不要考虑统一把这种注释replace掉呢?我本地是这么处理的,由于pull request我还不知道怎么提交,所以提个issue看方不方便统一处理一下
这个库的注释文字里本身就带有
*/
,我也很无奈
看能不能replace或者escape掉
提交了一个修复办法 8932317bbeaf68fad35b6c685526ca6eae1ea9d5 因为我现在在疫区没有能复现的机器,有时间麻烦帮忙验证下
提交了一个修复办法 8932317 因为我现在在疫区没有能复现的机器,有时间麻烦帮忙验证下
测试了下,是正常的,这是生成的index.d.ts
declare module 'csharp' {
import * as CSharp from 'csharp';
export default CSharp;
}
declare module 'csharp' {
interface $Ref<T> {
value: T
}
namespace System {
interface Array$1<T> extends System.Array {
get_Item(index: number):T;
set_Item(index: number, value: T):void;
}
}
interface $Task<T> {}
namespace ICSharpCode.SharpZipLib.Zip.Compression.Streams {
/**
* This class allows us to retrieve a specified number of bits from
* the input buffer, as well as copy big byte blocks.
* It uses an int buffer to store up to 31 bits for direct
* manipulation. This guarantees that we can get at least 16 bits,
* but we only need at most 15, so this is all safe.
* There are some optimizations in this class, for example, you must
* never peek more than 8 bits more than needed, and you must first
* peek bits before you may drop them. This is not a general purpose
* class but optimized for the behaviour of the Inflater.
* authors of the original java version : John Leuner, Jochen Hoenicke
*/
class StreamManipulator extends System.Object
{
/**
* Gets the number of bits available in the bit buffer. This must be
* only called when a previous PeekBits() returned -1.
* @returns
the number of bits available.
*/
public get AvailableBits(): number;
/** Gets the number of bytes available.
* @returns
The number of bytes available.
*/
public get AvailableBytes(): number;
/** Returns true when SetInput can be called */
public get IsNeedingInput(): boolean;
/**
* Get the next sequence of bits but don't increase input pointer. bitCount must be
* less or equal 16 and if this call succeeds, you must drop
* at least n - 8 bits in the next call.
* @param bitCount The number of bits to peek.
* @returns
the value of the bits, or -1 if not enough bits available. * /
*/
public PeekBits ($bitCount: number) : number
public TryGetBits ($bitCount: number, $output: $Ref<number>, $outputOffset?: number) : boolean
public TryGetBits ($bitCount: number, $array: $Ref<System.Array$1<number>>, $index: number) : boolean
/**
* Drops the next n bits from the input. You should have called PeekBits
* with a bigger or equal n before, to make sure that enough bits are in
* the bit buffer.
* @param bitCount The number of bits to drop.
*/
public DropBits ($bitCount: number) : void
/**
* Gets the next n bits and increases input pointer. This is equivalent
* to
* followed by
* , except for correct error handling.
* @param bitCount The number of bits to retrieve.
* @returns
the value of the bits, or -1 if not enough bits available.
*/
public GetBits ($bitCount: number) : number
public SkipToByteBoundary () : void
/**
* Copies bytes from input buffer to output buffer starting
* at output[offset]. You have to make sure, that the buffer is
* byte aligned. If not enough bytes are available, copies fewer
* bytes.
* @param output
The buffer to copy bytes to.
* @param offset
The offset in the buffer at which copying starts
* @param length
The length to copy, 0 is allowed.
* @returns
The number of bytes copied, 0 if no bytes were available.
*/
public CopyBytes ($output: System.Array$1<number>, $offset: number, $length: number) : number
public Reset () : void
/**
* Add more input for consumption.
* Only call when IsNeedingInput returns true
* @param buffer data to be input
* @param offset offset of first byte of input
* @param count number of bytes of input to add.
*/
public SetInput ($buffer: System.Array$1<number>, $offset: number, $count: number) : void
public constructor ()
}
}
namespace System {
class Object
{
}
class Int32 extends System.ValueType implements System.IComparable, System.IComparable$1<number>, System.IConvertible, System.IEquatable$1<number>, System.IFormattable
{
}
class ValueType extends System.Object
{
}
interface IComparable
{
}
interface IComparable$1<T>
{
}
interface IConvertible
{
}
interface IEquatable$1<T>
{
}
interface IFormattable
{
}
class Boolean extends System.ValueType implements System.IComparable, System.IComparable$1<boolean>, System.IConvertible, System.IEquatable$1<boolean>
{
}
class Byte extends System.ValueType implements System.IComparable, System.IComparable$1<number>, System.IConvertible, System.IEquatable$1<number>, System.IFormattable
{
}
interface ICloneable
{
}
class Void extends System.ValueType
{
}
class Array extends System.Object implements System.ICloneable, System.Collections.IEnumerable, System.Collections.IList, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.Collections.ICollection
{
}
}
namespace System.Collections {
interface IEnumerable
{
}
interface IList extends System.Collections.IEnumerable, System.Collections.ICollection
{
}
interface ICollection extends System.Collections.IEnumerable
{
}
interface IStructuralComparable
{
}
interface IStructuralEquatable
{
}
}
namespace System.Collections.Generic {
interface IList$1<T> extends System.Collections.IEnumerable, System.Collections.Generic.ICollection$1<T>, System.Collections.Generic.IEnumerable$1<T>
{
}
interface ICollection$1<T> extends System.Collections.IEnumerable, System.Collections.Generic.IEnumerable$1<T>
{
}
interface IEnumerable$1<T> extends System.Collections.IEnumerable
{
}
interface IReadOnlyCollection$1<T> extends System.Collections.IEnumerable, System.Collections.Generic.IEnumerable$1<T>
{
}
interface IReadOnlyList$1<T> extends System.Collections.IEnumerable, System.Collections.Generic.IReadOnlyCollection$1<T>, System.Collections.Generic.IEnumerable$1<T>
{
}
}
}
error log | 日志或报错信息
这是生成的index.d.ts,报错的地方我标注了,搜//可以找到
context | 编译/运行环境
Unity 2020.3.26f1c1 Unity_Plugin_1.2.3,Version:15 2022/2/11拉取的最新puerts代码
how to reproduce | 复现步骤
[Configure] public class PuertsConfig { [Binding] static IEnumerable DynamicBindings
{
get
{
return new List()
{
typeof(ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator),
};
}
}
}
more | 其他