From 7891c52cbf0d654d9b15076f29b675b77cd2b585 Mon Sep 17 00:00:00 2001 From: h-a-n-a Date: Sun, 19 Dec 2021 20:19:33 +0800 Subject: [PATCH] test: update type snapshot --- cli/src/build.ts | 2 +- examples/napi/__test__/typegen.spec.ts.md | 12 +++++++++++- examples/napi/__test__/typegen.spec.ts.snap | Bin 1979 -> 2075 bytes examples/napi/index.d.ts | 3 +++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cli/src/build.ts b/cli/src/build.ts index 919fd400..9896863b 100644 --- a/cli/src/build.ts +++ b/cli/src/build.ts @@ -364,7 +364,7 @@ async function processIntermediateTypeFile( const dtsHeader = `/* tslint:disable */ /* eslint-disable */ -/* auto-generated by Napi-rs */ +/* auto-generated by NAPI-RS */ export class ExternalObject { readonly '': { diff --git a/examples/napi/__test__/typegen.spec.ts.md b/examples/napi/__test__/typegen.spec.ts.md index 106ed2e6..f2a985cc 100644 --- a/examples/napi/__test__/typegen.spec.ts.md +++ b/examples/napi/__test__/typegen.spec.ts.md @@ -8,7 +8,10 @@ Generated by [AVA](https://avajs.dev). > Snapshot 1 - `/* eslint-disable */␊ + `/* tslint:disable */␊ + /* eslint-disable */␊ + ␊ + /* auto-generated by NAPI-RS */␊ ␊ export class ExternalObject {␊ readonly '': {␊ @@ -156,6 +159,13 @@ Generated by [AVA](https://avajs.dev). kind: number␊ constructor(name: string, kind: number)␊ }␊ + export class NinjaTurtle {␊ + name: string␊ + /** Create your ninja turtle! 🐢 */␊ + static newRaph(): NinjaTurtle␊ + getMaskColor(): string␊ + getName(): string␊ + }␊ export class ClassWithFactory {␊ name: string␊ static withName(name: string): ClassWithFactory␊ diff --git a/examples/napi/__test__/typegen.spec.ts.snap b/examples/napi/__test__/typegen.spec.ts.snap index 43419afb7c8e77e98f924c63a19fb9f43a0a3959..7132e138178a4d146c329322e0d5ea2e719460d4 100644 GIT binary patch literal 2075 zcmV+$2;}!cRzVS0 zC+uktds$#F+drbWqCoFG7yS>4J?(klBWE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Jn&xDnA4w!HB*Re%d~k#4-$&^uwnc24EPce6doGA^GJ@_-U% zg{d=4urQPuEioPXtjk#VpzX}w6?NSOLUYo*hmcsj5dLurQmz9v7z{Xpy{N+OOO#^= z{7nag743}0P2Rvw+T~KVCJ39;S~u}uRJxr*wL+8QVz-38c1eTQ=s8TdkYuEOvotY5DG$$so5v5)fT3=oQ*&(fbxdE)9F{NU N{s*&hcAhsE004+SxGDeu diff --git a/examples/napi/index.d.ts b/examples/napi/index.d.ts index d498072d..da358ea6 100644 --- a/examples/napi/index.d.ts +++ b/examples/napi/index.d.ts @@ -1,5 +1,8 @@ +/* tslint:disable */ /* eslint-disable */ +/* auto-generated by NAPI-RS */ + export class ExternalObject { readonly '': { readonly '': unique symbol