さて、つい先日.NET 5と共にC# 9.0がリリースされました。C# 9.0の新機能は多々あるのですがその中でパターンマッチングの強化の一貫でvalue is not nullのようにnot条件が追加されました。この新機能によってC# 8.0のようにnot null判定をするためにvalue != nullやvalue is T nonNullやvalue is {}を書かずとも自然言語的な文章で書けるようになりました
null判定に関しては方法が少ないためパフォーマンスが同じならば書き手の好きな方を選べばいいとなるかと思いきや、==演算子がオーバーロード可能なため型によってはnullと==比較しているのにfalseを返すような邪悪なことをされる恐れがあります*3。より意図した通りのコードにしたいならばvalue is nullの判定方法が一択になるでしょう
not null判定
not null判定はnull判定よりも方法が多く、自分が知っているだけでもよく使われるもので5種類あります
// Value == null// !(Value is string)// Value is null// object.ReferenceEquals(Value, null)ldarg.0callinstancestringNullCheck.Benchmark.ReferenceNullBench::get_Value()
ldnullceq
// !(Value is string notNullValue)// !(Value is { })// !(Value is not null)ldarg.0callinstancestringNullCheck.Benchmark.ReferenceNullBench::get_Value()
ldnullcgt.unldc.i4.0ceq
// Value != null// Value is string// Value is string notNullValue// Value is { }// Value is not null// !(object.ReferenceEquals(Value, null))ldarg.0callinstancestringNullCheck.Benchmark.ReferenceNotNullBench::get_Value()
ldnullcgt.un
こちらはnull判定の時とは逆にcgt.unで大小比較するという形になっていますね。ベンチマーク結果的にはValue != nullとValue is stringとValue is { }が他のケースよりちょっと遅いかな(?)という印象もありましたがCIL的には同じ結果にコンパイルされているので誤差の範囲なのでしょうか…(MinとMaxでも明らかに差がついているのでランタイム側でなんらかの最適化が入ってそうな気がしないこともないですがこれ以上はわかりませんね)
// !(Value is null)ldarg.0callinstancestringNullCheck.Benchmark.ReferenceNotNullBench::get_Value()
ldnullceqldc.i4.0ceq
// Value == null// !(Value.HasValue)// Value is null// !(Value is { })// !(Value is not null)ldarg.0callinstancevaluetype [System.Runtime]System.Nullable`1<int32> NullCheck.Benchmark.ValueNullBench::get_Value()
stloc.2ldloca.s2callinstanceboolvaluetype [System.Runtime]System.Nullable`1<int32>::get_HasValue()
ldc.i4.0ceq
// !(Value is int)ldarg.0callinstancevaluetype [System.Runtime]System.Nullable`1<int32> NullCheck.Benchmark.ValueNullBench::get_Value()
boxvaluetype [System.Runtime]System.Nullable`1<int32>
isinst [System.Runtime]System.Int32ldnullcgt.unldc.i4.0ceq
IsOperatorのケースが値型で極端に遅いというベンチマーク結果が出ていましたが、原因はboxでボックス化しているからですね。この遅さはC# 7.3の頃に調べてみた結果と同様なままのようです。コンパイラーの最適化次第な領域ではありますが、現時点でボックス化される形にコンパイルされることを鑑みると値型においてはvalue is intみたいな形式は避けておいたほうが無難でしょう
// Value != null// Value.HasValue// Value is { }// Value is not nullldarg.0callinstancevaluetype [System.Runtime]System.Nullable`1<int32> NullCheck.Benchmark.ValueNotNullBench::get_Value()
stloc.2ldloca.s2callinstanceboolvaluetype [System.Runtime]System.Nullable`1<int32>::get_HasValue()
こちらは値型・null判定でのValue is nullなどのケースからldc.i4.0とceqをしなくなったバージョンです。単純にbool値の反転がなくなったということですね
Value is intやValue is int notNullValueでも同様にldc.i4.0とceqの命令がなくなっていました
// !(Value is null)ldarg.0callinstancevaluetype [System.Runtime]System.Nullable`1<int32> NullCheck.Benchmark.ValueNotNullBench::get_Value()
stloc.2ldloca.s2callinstanceboolvaluetype [System.Runtime]System.Nullable`1<int32>::get_HasValue()
ldc.i4.0ceqldc.i4.0ceq
!(Value is null)のケースではValue is nullのケースからさらにldc.i4.0とceqで値の反転をしています
それと同時にsrc/mscorlib/src/System/Collections/Generic/ComparerHelpers.csのCreateDefaultComparerメソッドにand in vm/jitinterface.cpp so the jit can model the behavior of this method.というドキュメントコメントが追記されているためJIT側でDefaultのEqualityComparerを作成してるようです
また、デバッグの際、プランの ID とプロモーションオファーの ID を似たものにしてしまっていたため、正しい値がセットされているのかを判断し難くなってしまっていたので、プロモーションオファーの ID には promotion_offer_~ のように接頭辞などを付けるようにすると分かりやすくなりそうでした。
// DisplayCount.vueimport{ defineComponent }from"vue";exportdefault defineComponent({
setup(){const count = ref(0);// a. 数をカウントしたいconst increment =()=>(count.value +=1);// a. 数をカウントしたいconst decrement =()=>(count.value -=1);// a. 数をカウントしたいconst display = ref(true);// b. 表示を切り替えたいconst toggleDisplay =()=>(display.value = !display.value);// b. 表示を切り替えたいconst toggleDisplayText = computed(()=>(display.value ? "hide" : "show"));// b. 表示を切り替えたいreturn{
count,// a. 数をカウントしたい
increment,// a. 数をカウントしたい
decrement,// a. 数をカウントしたい
display,// b. 表示を切り替えたい
toggleDisplay,// b. 表示を切り替えたい
toggleDisplayText // b. 表示を切り替えたい};}});
Vue CLI v4.5.9
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, TS, Vuex, CSS Pre-processors, Linter
? Choose a version of Vue.js that you want to start the project with 3.x (Preview)
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Stylus
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No
いったんビルドしてみる
エラーがたくさん出ます。
このまま一旦コミットしておきます。
エラーログ全文
ERROR in src/App.vue:21:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type 'VueClass<any>' is missing the following properties from type 'typeof App': extend, set, delete, directive, and 6 more.
19 | import { ColorDefinition } from './core/ColorDefinition';
20 |
> 21 | @Component({
| ^^^^^^^^^^^^
> 22 | components: {
| ^^^^^^^^^^^^^^^
> 23 | AppHeader,
| ^^^^^^^^^^^^^^^
> 24 | StreamEditor,
| ^^^^^^^^^^^^^^^
> 25 | BottomNav,
| ^^^^^^^^^^^^^^^
> 26 | },
| ^^^^^^^^^^^^^^^
> 27 | })
| ^^^
28 | export default class App extends Vue.extend({
29 | computed: {
30 | ...domainStreamColorizerModule.mapState(['colorMatcherSourceCode']),
ERROR in src/App.vue:21:2
TS2345: Argument of type 'typeof App' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof App' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
19 | import { ColorDefinition } from './core/ColorDefinition';
20 |
> 21 | @Component({
| ^^^^^^^^^^^
> 22 | components: {
| ^^^^^^^^^^^^^^^
> 23 | AppHeader,
| ^^^^^^^^^^^^^^^
> 24 | StreamEditor,
| ^^^^^^^^^^^^^^^
> 25 | BottomNav,
| ^^^^^^^^^^^^^^^
> 26 | },
| ^^^^^^^^^^^^^^^
> 27 | })
| ^^^
28 | export default class App extends Vue.extend({
29 | computed: {
30 | ...domainStreamColorizerModule.mapState(['colorMatcherSourceCode']),
ERROR in src/App.vue:28:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
26 | },
27 | })
> 28 | export default class App extends Vue.extend({
| ^^^
29 | computed: {
30 | ...domainStreamColorizerModule.mapState(['colorMatcherSourceCode']),
31 | ...domainStreamColorizerModule.mapGetters(['colorDefinitions']),
ERROR in src/components/AppHeader/AppHeader.ts:3:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<any>>(target: VC) => VC' is missing the following properties from type 'typeof AppHeader': extend, nextTick, set, delete, and 9 more.
1 | import { Component, Vue } from 'vue-property-decorator';
2 |
> 3 | @Component
| ^^^^^^^^^^
4 | export default class AppHeader extends Vue {}
5 |
ERROR in src/components/AppHeader/AppHeader.ts:3:2
TS2769: No overload matches this call.
Overload 1 of 2, '(options: ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>): <VC extends VueClass<any>>(target: VC) => VC', gave the following error.
Argument of type 'typeof AppHeader' is not assignable to parameter of type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>'.
Type 'typeof AppHeader' is not assignable to type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}>'.
Types of property 'call' are incompatible.
Type '<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void' is not assignable to type '(this: unknown, ...args: unknown[]) => never'.
The 'this' types of each signature are incompatible.
Type 'unknown' is not assignable to type 'new (...args: unknown[]) => unknown'.
Overload 2 of 2, '(target: VueClass<any>): VueClass<any>', gave the following error.
Argument of type 'typeof AppHeader' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof AppHeader' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
1 | import { Component, Vue } from 'vue-property-decorator';
2 |
> 3 | @Component
| ^^^^^^^^^
4 | export default class AppHeader extends Vue {}
5 |
ERROR in src/components/AppHeader/AppHeader.ts:4:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
2 |
3 | @Component
> 4 | export default class AppHeader extends Vue {}
| ^^^^^^^^^
5 |
ERROR in src/components/BottomNav/BottomNav.ts:9:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type 'VueClass<any>' is missing the following properties from type 'typeof BottomNav': extend, set, delete, directive, and 6 more.
7 | import StreamColorizer from '../StreamColorizer/StreamColorizer.vue';
8 |
> 9 | @Component({
| ^^^^^^^^^^^^
> 10 | components: {
| ^^^^^^^^^^^^^^^
> 11 | MessageOutput,
| ^^^^^^^^^^^^^^^
> 12 | StreamColorizer,
| ^^^^^^^^^^^^^^^
> 13 | },
| ^^^^^^^^^^^^^^^
> 14 | })
| ^^^
15 | export default class BottomNav extends Vue.extend({
16 | computed: {
17 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
ERROR in src/components/BottomNav/BottomNav.ts:9:2
TS2345: Argument of type 'typeof BottomNav' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof BottomNav' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
7 | import StreamColorizer from '../StreamColorizer/StreamColorizer.vue';
8 |
> 9 | @Component({
| ^^^^^^^^^^^
> 10 | components: {
| ^^^^^^^^^^^^^^^
> 11 | MessageOutput,
| ^^^^^^^^^^^^^^^
> 12 | StreamColorizer,
| ^^^^^^^^^^^^^^^
> 13 | },
| ^^^^^^^^^^^^^^^
> 14 | })
| ^^^
15 | export default class BottomNav extends Vue.extend({
16 | computed: {
17 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
ERROR in src/components/BottomNav/BottomNav.ts:15:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
13 | },
14 | })
> 15 | export default class BottomNav extends Vue.extend({
| ^^^^^^^^^
16 | computed: {
17 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
18 | ...uiBottomNavModule.mapState(['enabled']),
ERROR in src/components/MessageOutput/MessageOutput.ts:4:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<any>>(target: VC) => VC' is missing the following properties from type 'typeof MessageOutput': extend, nextTick, set, delete, and 9 more.
2 | import { domainStreamEditorModule } from '../../store/modules/internal';
3 |
> 4 | @Component
| ^^^^^^^^^^
5 | export default class MessageOutput extends Vue.extend({
6 | computed: {
7 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
ERROR in src/components/MessageOutput/MessageOutput.ts:4:2
TS2769: No overload matches this call.
Overload 1 of 2, '(options: ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>): <VC extends VueClass<any>>(target: VC) => VC', gave the following error.
Argument of type 'typeof MessageOutput' is not assignable to parameter of type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>'.
Type 'typeof MessageOutput' is not assignable to type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}>'.
Types of property 'call' are incompatible.
Type '<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void' is not assignable to type '(this: unknown, ...args: unknown[]) => never'.
Overload 2 of 2, '(target: VueClass<any>): VueClass<any>', gave the following error.
Argument of type 'typeof MessageOutput' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof MessageOutput' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
2 | import { domainStreamEditorModule } from '../../store/modules/internal';
3 |
> 4 | @Component
| ^^^^^^^^^
5 | export default class MessageOutput extends Vue.extend({
6 | computed: {
7 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
ERROR in src/components/MessageOutput/MessageOutput.ts:5:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
3 |
4 | @Component
> 5 | export default class MessageOutput extends Vue.extend({
| ^^^^^^^^^^^^^
6 | computed: {
7 | ...domainStreamEditorModule.mapState(['errorMessage', 'message']),
8 | },
ERROR in src/components/StreamColorizer/StreamColorizer.ts:2:10
TS2305: Module '"../../../node_modules/vue/dist/vue"' has no exported member 'VueConstructor'.
1 | import { Component, Vue } from 'vue-property-decorator';
> 2 | import { VueConstructor } from 'vue';
| ^^^^^^^^^^^^^^
3 | import { domainStreamColorizerModule } from '../../store/modules/internal';
4 | import { Photoshop } from 'vue-color';
5 | import { ColorDefinition } from '../../core/ColorDefinition';
ERROR in src/components/StreamColorizer/StreamColorizer.ts:7:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type 'VueClass<any>' is missing the following properties from type 'typeof StreamColorizer': extend, set, delete, directive, and 6 more.
5 | import { ColorDefinition } from '../../core/ColorDefinition';
6 |
> 7 | @Component({
| ^^^^^^^^^^^^
> 8 | components: {
| ^^^^^^^^^^^^^^^
> 9 | PhotoshopPicker: Photoshop as VueConstructor,
| ^^^^^^^^^^^^^^^
> 10 | },
| ^^^^^^^^^^^^^^^
> 11 | })
| ^^^
12 | export default class StreamColorizer extends Vue.extend({
13 | computed: {
14 | ...domainStreamColorizerModule.mapState([
ERROR in src/components/StreamColorizer/StreamColorizer.ts:7:2
TS2345: Argument of type 'typeof StreamColorizer' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof StreamColorizer' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
5 | import { ColorDefinition } from '../../core/ColorDefinition';
6 |
> 7 | @Component({
| ^^^^^^^^^^^
> 8 | components: {
| ^^^^^^^^^^^^^^^
> 9 | PhotoshopPicker: Photoshop as VueConstructor,
| ^^^^^^^^^^^^^^^
> 10 | },
| ^^^^^^^^^^^^^^^
> 11 | })
| ^^^
12 | export default class StreamColorizer extends Vue.extend({
13 | computed: {
14 | ...domainStreamColorizerModule.mapState([
ERROR in src/components/StreamColorizer/StreamColorizer.ts:12:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
10 | },
11 | })
> 12 | export default class StreamColorizer extends Vue.extend({
| ^^^^^^^^^^^^^^^
13 | computed: {
14 | ...domainStreamColorizerModule.mapState([
15 | 'colorMatcherSourceCode',
ERROR in src/components/StreamEditor/StreamEditor.ts:7:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type 'VueClass<any>' is missing the following properties from type 'typeof StreamEditor': extend, set, delete, directive, and 6 more.
5 | import debounce from 'lodash-es/debounce';
6 |
> 7 | @Component({
| ^^^^^^^^^^^^
> 8 | components: {
| ^^^^^^^^^^^^^^^
> 9 | StreamEditorItem,
| ^^^^^^^^^^^^^^^
> 10 | },
| ^^^^^^^^^^^^^^^
> 11 | })
| ^^^
12 | export default class StreamEditor extends Vue.extend({
13 | computed: {
14 | ...domainStreamEditorModule.mapGetters(['streamDatasets', 'sourceCode']),
ERROR in src/components/StreamEditor/StreamEditor.ts:7:2
TS2345: Argument of type 'typeof StreamEditor' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof StreamEditor' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
5 | import debounce from 'lodash-es/debounce';
6 |
> 7 | @Component({
| ^^^^^^^^^^^
> 8 | components: {
| ^^^^^^^^^^^^^^^
> 9 | StreamEditorItem,
| ^^^^^^^^^^^^^^^
> 10 | },
| ^^^^^^^^^^^^^^^
> 11 | })
| ^^^
12 | export default class StreamEditor extends Vue.extend({
13 | computed: {
14 | ...domainStreamEditorModule.mapGetters(['streamDatasets', 'sourceCode']),
ERROR in src/components/StreamEditor/StreamEditor.ts:12:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
10 | },
11 | })
> 12 | export default class StreamEditor extends Vue.extend({
| ^^^^^^^^^^^^
13 | computed: {
14 | ...domainStreamEditorModule.mapGetters(['streamDatasets', 'sourceCode']),
15 | },
ERROR in src/components/StreamEditor/StreamEditor.ts:25:10
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
23 | }) {
24 | @Watch('sourceCode')
> 25 | public watchSourceCode() {
| ^^^^^^^^^^^^^^^
26 | this.evaluateSourceCodeDebounced();
27 | }
28 |
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:23:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type 'VueClass<any>' is missing the following properties from type 'typeof StreamEditorItem': extend, set, delete, directive, and 6 more.
21 | };
22 |
> 23 | @Component({
| ^^^^^^^^^^^^
> 24 | components: {
| ^^^^^^^^^^^^^^^
> 25 | StreamEditorTextarea,
| ^^^^^^^^^^^^^^^
> 26 | },
| ^^^^^^^^^^^^^^^
> 27 | })
| ^^^
28 | export default class StreamEditorItem extends Vue.extend({
29 | computed: {
30 | ...domainStreamColorizerModule.mapGetters([
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:23:2
TS2345: Argument of type 'typeof StreamEditorItem' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof StreamEditorItem' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
21 | };
22 |
> 23 | @Component({
| ^^^^^^^^^^^
> 24 | components: {
| ^^^^^^^^^^^^^^^
> 25 | StreamEditorTextarea,
| ^^^^^^^^^^^^^^^
> 26 | },
| ^^^^^^^^^^^^^^^
> 27 | })
| ^^^
28 | export default class StreamEditorItem extends Vue.extend({
29 | computed: {
30 | ...domainStreamColorizerModule.mapGetters([
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:28:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
26 | },
27 | })
> 28 | export default class StreamEditorItem extends Vue.extend({
| ^^^^^^^^^^^^^^^^
29 | computed: {
30 | ...domainStreamColorizerModule.mapGetters([
31 | 'colorCodeGetter',
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:39:18
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
37 | },
38 | }) {
> 39 | @Prop() public dataset: StreamDataset | undefined;
| ^^^^^^^
40 | @Prop({ required: true }) public index!: boolean;
41 | @Prop({ default: false }) public disabled!: boolean;
42 |
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:40:36
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
38 | }) {
39 | @Prop() public dataset: StreamDataset | undefined;
> 40 | @Prop({ required: true }) public index!: boolean;
| ^^^^^
41 | @Prop({ default: false }) public disabled!: boolean;
42 |
43 | get events() {
ERROR in src/components/StreamEditorItem/StreamEditorItem.ts:41:36
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
39 | @Prop() public dataset: StreamDataset | undefined;
40 | @Prop({ required: true }) public index!: boolean;
> 41 | @Prop({ default: false }) public disabled!: boolean;
| ^^^^^^^^
42 |
43 | get events() {
44 | return this.dataset ? this.dataset.events : [];
ERROR in src/components/StreamEditorTextarea/StreamEditorTextarea.ts:5:1
TS1238: Unable to resolve signature of class decorator when called as an expression.
Type '<VC extends VueClass<any>>(target: VC) => VC' is missing the following properties from type 'typeof StreamEditorTextarea': extend, nextTick, set, delete, and 9 more.
3 | import { domainStreamEditorModule } from '../../store/modules/internal';
4 |
> 5 | @Component
| ^^^^^^^^^^
6 | export default class StreamEditorTextarea extends Vue.extend({
7 | methods: {
8 | ...domainStreamEditorModule.mapMutations(['setSourceCode']),
ERROR in src/components/StreamEditorTextarea/StreamEditorTextarea.ts:5:2
TS2769: No overload matches this call.
Overload 1 of 2, '(options: ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>): <VC extends VueClass<any>>(target: VC) => VC', gave the following error.
Argument of type 'typeof StreamEditorTextarea' is not assignable to parameter of type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}> & ThisType<any> & ThisType<any>'.
Type 'typeof StreamEditorTextarea' is not assignable to type 'ComponentOptionsBase<any, any, any, any, any, any, any, any, string, {}>'.
Types of property 'call' are incompatible.
Type '<T, A extends any[]>(this: new (...args: A) => T, thisArg: T, ...args: A) => void' is not assignable to type '(this: unknown, ...args: unknown[]) => never'.
Overload 2 of 2, '(target: VueClass<any>): VueClass<any>', gave the following error.
Argument of type 'typeof StreamEditorTextarea' is not assignable to parameter of type 'VueClass<any>'.
Type 'typeof StreamEditorTextarea' is missing the following properties from type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")': useCssModule, useCssVars, createApp, createSSRApp, and 108 more.
3 | import { domainStreamEditorModule } from '../../store/modules/internal';
4 |
> 5 | @Component
| ^^^^^^^^^
6 | export default class StreamEditorTextarea extends Vue.extend({
7 | methods: {
8 | ...domainStreamEditorModule.mapMutations(['setSourceCode']),
ERROR in src/components/StreamEditorTextarea/StreamEditorTextarea.ts:6:22
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
4 |
5 | @Component
> 6 | export default class StreamEditorTextarea extends Vue.extend({
| ^^^^^^^^^^^^^^^^^^^^
7 | methods: {
8 | ...domainStreamEditorModule.mapMutations(['setSourceCode']),
9 | },
ERROR in src/components/StreamEditorTextarea/StreamEditorTextarea.ts:11:18
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
9 | },
10 | }) {
> 11 | @Prop() public dataset: StreamDataset | undefined;
| ^^^^^^^
12 | @Prop({ default: false }) public disabled!: boolean;
13 |
14 | get sourceCode() {
ERROR in src/components/StreamEditorTextarea/StreamEditorTextarea.ts:12:36
TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
10 | }) {
11 | @Prop() public dataset: StreamDataset | undefined;
> 12 | @Prop({ default: false }) public disabled!: boolean;
| ^^^^^^^^
13 |
14 | get sourceCode() {
15 | return this.dataset ? this.dataset.sourceCode : '';
ERROR in src/main.ts:6:5
TS2339: Property 'use' does not exist on type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")'.
4 | import VueTextareaAutosize from 'vue-textarea-autosize';
5 |
> 6 | Vue.use(VueTextareaAutosize);
| ^^^
7 | Vue.config.productionTip = false;
8 |
9 | new Vue({
ERROR in src/main.ts:7:5
TS2339: Property 'config' does not exist on type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")'.
5 |
6 | Vue.use(VueTextareaAutosize);
> 7 | Vue.config.productionTip = false;
| ^^^^^^
8 |
9 | new Vue({
10 | store,
ERROR in src/main.ts:9:5
TS2351: This expression is not constructable.
Type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")' has no construct signatures.
7 | Vue.config.productionTip = false;
8 |
> 9 | new Vue({
| ^^^
10 | store,
11 | render: h => h(App),
12 | }).$mount('#app');
ERROR in src/main.ts:11:11
TS7006: Parameter 'h' implicitly has an 'any' type.
9 | new Vue({
10 | store,
> 11 | render: h => h(App),
| ^
12 | }).$mount('#app');
13 |
ERROR in src/store/index.ts:6:5
TS2339: Property 'use' does not exist on type 'typeof import("/Users/okamoto.k/_ghqroot/github.com/all-user/rxjs-stream-editor/node_modules/vue/dist/vue")'.
4 | import { rootModule } from './modules';
5 |
> 6 | Vue.use(Vuex);
| ^^^
7 |
8 | export default createStore(rootModule);
9 |