-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Unity] 生成的index.d.ts连续出现2个*/导致语法报错,目前仅发现ICSharpCode.SharpZipLib.Zip.Compression.Streams.StreamManipulator #659
Comments
提交了一个修复办法 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>
{
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
error log | 日志或报错信息
这是生成的index.d.ts,报错的地方我标注了,搜//可以找到
context | 编译/运行环境
Unity 2020.3.26f1c1
Unity_Plugin_1.2.3,Version:15
2022/2/11拉取的最新puerts代码
how to reproduce | 复现步骤
more | 其他
The text was updated successfully, but these errors were encountered: