Ejemplo n.º 1
0
        public void DictionaryOfOptionalUnion()
        {
            var type = new Schema(BifoqlType.DictionaryOf(BifoqlType.Optional(
                                                              BifoqlType.Union(BifoqlType.String, BifoqlType.Number, BifoqlType.Null))));

            Assert.Equal("string => (string | number | null)?", type.BuildDocumentation());
        }
Ejemplo n.º 2
0
        public void ArrayOfUnion()
        {
            var type = new Schema(BifoqlType.ArrayOf(
                                      BifoqlType.Union(BifoqlType.String, BifoqlType.Number, BifoqlType.Null)));

            Assert.Equal("(string | number | null)[]", type.BuildDocumentation());
        }
Ejemplo n.º 3
0
        public void UnionType()
        {
            var type = new Schema(BifoqlType.Union(BifoqlType.String, BifoqlType.Number, BifoqlType.Null));

            Assert.Equal("string | number | null", type.BuildDocumentation());
        }