<commit_before>﻿using System;
using System.Collections.Generic;

namespace TsModelGen.Core
{
    public static class DotNetToTypeScriptType
    {
        public static Dictionary<string, string> Mapping => MappingLazy.Value;

        private static readonly Lazy<Dictionary<string, string>> MappingLazy =
            new Lazy<Dictionary<string, string>>(
                // Simple cases:
                // * object -> any
                // * primitive types to their TS direct translations
                () => new Dictionary<string, string>
                {
                    {typeof(object).FullName, "any"},

                    {typeof(short).FullName, "number"},
                    {typeof(int).FullName, "number"},
                    {typeof(long).FullName, "number"},
                    {typeof(ushort).FullName, "number"},
                    {typeof(uint).FullName, "number"},
                    {typeof(ulong).FullName, "number"},
                    {typeof(byte).FullName, "number"},
                    {typeof(sbyte).FullName, "number"},
                    {typeof(float).FullName, "number"},
                    {typeof(double).FullName, "number"},

                    {typeof(bool).FullName, "boolean"},

                    {typeof(string).FullName, "string"},

                    {typeof(DateTime).FullName, "boolean"}

                    // { typeof(char).FullName, "any" },
                    // { typeof(TimeSpan).FullName, "boolean" },
                });
    }
}<commit_msg>Add missing Decimal translation<commit_after>﻿using System;
using System.Collections.Generic;

namespace TsModelGen.Core
{
    public static class DotNetToTypeScriptType
    {
        public static Dictionary<string, string> Mapping => MappingLazy.Value;

        private static readonly Lazy<Dictionary<string, string>> MappingLazy =
            new Lazy<Dictionary<string, string>>(
                // Simple cases:
                // * object -> any
                // * primitive types to their TS direct translations
                () => new Dictionary<string, string>
                {
                    {typeof(object).FullName, "any"},

                    {typeof(short).FullName, "number"},
                    {typeof(int).FullName, "number"},
                    {typeof(long).FullName, "number"},
                    {typeof(ushort).FullName, "number"},
                    {typeof(uint).FullName, "number"},
                    {typeof(ulong).FullName, "number"},
                    {typeof(byte).FullName, "number"},
                    {typeof(sbyte).FullName, "number"},
                    {typeof(float).FullName, "number"},
                    {typeof(double).FullName, "number"},
                    {typeof(decimal).FullName, "number"},

                    {typeof(bool).FullName, "boolean"},

                    {typeof(string).FullName, "string"},

                    {typeof(DateTime).FullName, "boolean"}

                    // { typeof(char).FullName, "any" },
                    // { typeof(TimeSpan).FullName, "boolean" },
                });
    }
}
{'fraction_non_alphanumeric': 0.1325806451612903, 'fraction_numerical': 0.0, 'mean_word_length': 1.5863219349457882, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '641625', 'n_tokens_mistral': 798, 'n_tokens_neox': 733, 'n_words': 147}