diff --git a/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts new file mode 100644 index 00000000..5c281e9a --- /dev/null +++ b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/input.ts @@ -0,0 +1,5 @@ +import { Inject } from "react-obsidian"; + +export class Foo { + @Inject() public readonly bar!: string; +} diff --git a/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js new file mode 100644 index 00000000..94af579f --- /dev/null +++ b/packages/swc-plugin-obsidian/tests/fixtures/namedInject/output.js @@ -0,0 +1,5 @@ +import { Inject } from "react-obsidian"; +export class Foo { + @Inject("bar") + public readonly bar!: string; +}